Tutorial by Examples

Preconditions These instructions suppose you have any type of Linux, Unix, Mac with bash or Git-bash Windows. Windows: Download and install Git-bash for Windows, then execute 'bash' from command line. Other shells than bash are fine too, just replace the activate command below with activate.csh...
If you have a virtualenv and CherryPy is already installed in it, create a file hello.py: #!/usr/bin/env python # -*- coding: UTF-8 -*- import cherrypy class HelloWorld(object): @cherrypy.expose def index(self): return 'Hello World!' @cherrypy.expose def greet(...
This example consists of three parts: server.py - CherryPy application that can receive and save a file. webpage.html - Example how to upload a file to server.py from a webpage. cli.py - Example how to upload a file to server.py from a command line tool. Bonus - upload.txt - file that you will...

Page 1 of 1