Jump to content


Photo

Ch8


  • Please log in to reply
2 replies to this topic

#1 emozhe

emozhe

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 December 2013 - 05:58 PM

Hi, Paul:
I just start to program since last month.
I have tried everything to finish the chapter 8, but
it does not seem to work.
page273
Starting simple_httpd on port: 8080
http://localhost:808...nerate_names.py
["James Lee", "Julie Jones", "Mikey McManus", "Sally Sanchez", "Sarah Sweeney", "Vera Vi"]
in python3.3 shell display
127.0.0.1 - - [24/Dec/2013 21:54:27] "GET /cgi-bin/generate_names.py HTTP/1.1" 200 -
127.0.0.1 - - [24/Dec/2013 21:54:27] command: C:\Python33\python.exe -u C:\Python33\HeadFirstPython\chapter8\webapp-chapter8\cgi-bin\generate_names.py ""
127.0.0.1 - - [24/Dec/2013 21:54:28] CGI script exited OK
127.0.0.1 - - [24/Dec/2013 21:54:28] "GET /favicon.ico HTTP/1.1" 200 -


Can you tell me what's wrong?
Thanks for your instruction

#2 emozhe

emozhe

    New Member

  • Members
  • Pip
  • 6 posts

Posted 24 December 2013 - 06:00 PM

1) Windows7 PC
2) Python3.2 on PC
3) sl4a_r3.apk on AVD (Android device)
4) PythonForAndroid_r1.apk on AVD (Android device)
5) AVD = Android 4.0 (API14)

I upload "coachapp.py" to avd. And when i open the file, error comes out like below.
coachapp.py started!
coachapp.py exited!
The variable Web_Server looked like this: Web_Server = 'http://192.168.1.100:8080'
0
Can you tell me what's wrong?
Thanks for your instruction

#3 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 04 January 2014 - 11:52 PM

Sorry you are having difficulties.

You are using a different version of Python, as well as a different version of sl4a, than used in the book. I can't vouch for anything other than the versions of the technologies described in the book. Some other readers have reported success with different setups, while others have reported problems. If you match your setup to the one in the book, things do work.

It looks like your code is working (running) - as you are getting all those OK messages - but you'd need to upload it so that everyone on the forum can see what you are actually executing.

Regards.

--Paul.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users