Jump to content


Photo

Chapter 7,some Question On Web


  • Please log in to reply
2 replies to this topic

#1 leemoispace

leemoispace

    New Member

  • Members
  • Pip
  • 3 posts

Posted 22 March 2013 - 02:03 AM

I unziped the source code donwloaded from this site, and started the simple_httpd.py without any editing.
When I go to http://localhost:808...enerate_list.py , the page is white while the terminal prints:

leemoispace@lee-ThinkPad-X230:~/Dropbox/python/hfpy_code/chapter7/webapp-chapter7$ python3 simple_httpd.py
Starting simple_httpd on port: 8080
127.0.0.1 - - [22/Mar/2013 17:59:20] "GET /cgi-bin/generate_list.py HTTP/1.1" 200 -
Traceback (most recent call last):
File "/usr/lib/python3.2/http/server.py", line 1115, in run_cgi
os.execve(scriptfile, args, env)
OSError: [Errno 2] No such file or directory
127.0.0.1 - - [22/Mar/2013 17:59:20] CGI script exit status 0x7f00

waiting for your help. Thanks a lot!

#2 leemoispace

leemoispace

    New Member

  • Members
  • Pip
  • 3 posts

Posted 22 March 2013 - 09:24 PM

I've found a same situation as mine in the old pages ,
http://forums.oreill...stpy-wont-load/

thanks any way ! It's an amazing book!

#3 leemoispace

leemoispace

    New Member

  • Members
  • Pip
  • 3 posts

Posted 22 March 2013 - 09:31 PM

In my case
the first line of the files should be:
#! /usr/bin/python3

that depends on where the installation was.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users