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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -