python - Deploying CGI on Pythonanywhere -
i want use pythonanywhere deploying cgi-projects. i've uploaded home/[username]/hello.py file:
#!/usr/bin/env python2 print "content-type: text/html\n" print "<h1>hello world!</h1>"
i think should edit /var/www/[username]_pythonanywhere_wsgi.py and/or launch like
python2 -m cgihttpserver
from /home/[username], can't understand me do. want run code described above loading [username].pythonanywhere.com/hello.py. have html-s, css-s , other static files, , want them opened too. please help!
pythonanywhere dev here, don't support cgi model of web applications. use python protocol called "wsgi" instead. can hand-write own wsgi-compatible services, people choose use web framework django or flask instead.
head on "web" tab more info , examples.
Comments
Post a Comment