My Mac Environment, python3.5
1. Installation bobo: >>> PIP3 Install Bobo
2. Configure Environment variables:
$: VI ~/.bash_profile
Add a line: Alias bobo = "Address" (I just install finished Bobo, in the bin of python3.5 more Bobo boot file, this address is the address of the boot file)
Exit VI
$: Source ~/.bash_profile
3. Create a method using Bobo in a py file, the contents of the file
Import Bobo
@bobo. Query ('/')
def hello (person):
Return ' Hello%s '% person
4. $: bobo-f py file address/py file name.
This launches the Bobo Development server
5. Enter the browser, enter: localhost:8080
6. The browser displays "Missing form variable Person"
7. Open a different terminal input curl-i http://localhost:8080/, print the following
http/1.0 403 Forbidden
Date:fri, Oct 06:20:35 GMT
server:wsgiserver/0.2 cpython/3.5.3
content-type:text/html; Charset=utf-8
content-length:103
<body>missing form Variable person</body>
8 Open an additional terminal, enter: Curl-i http://localhost:8080/?person=jim
Terminal printing:
http/1.0 OK
Date:fri, Oct 06:21:14 GMT
server:wsgiserver/0.2 cpython/3.5.3
content-type:text/html; Charset=utf-8
Content-length:9
Browser input localhost:8080/?person=jim, browser display:
Hello Jim
"Python" "Bobo"