Re: [Tutor] 答复: Any book to study Python

2012-03-28 Thread wesley chun
 I'm reading your book and just typeing the TCP server and client example 
 scripts to my python and run it, but I did not get the expected results.

 For tstclnt.py(example 16.2,page 473 on the book),when I typed in vi and 
 execut it by python tstclnt.py, I get the error of 'No route to host'.

 Of course I modified the IP address to 192.168.1.11 which is on another linux 
 server in the script, I pinged the 192.168.1.11 and get successfully.(On 
 192.168.1.11 I run the TCP server program, it is the one on the book)

 Please see the screen shot for detail.

 Can you give me some suggestion on this error?



hi xianming,

any of the tutors here can help you, not just me! :-)

instead of a screenshot (many people use only terminals to read
email), it's best to just cut-n-paste the code and error traceback
into your email. based on what you sent in, it would be worthwhile for
you to also post the server code and output as well.

note that a positive ping and the client speaking to an address are
somewhat but not entirely related. the reason is that different
network protocols are being used. ping uses ICMP --
http://en.wikipedia.org/wiki/Internet_Control_Message_Protocol --
while the code uses TCP --
http://en.wikipedia.org/wiki/Transmission_Control_Protocol -- instead.

once you provide the server code and output, people may be able to
help you better.

best regards,
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A computer never does what you want... only what you tell it.
    wesley chun : wescpy at gmail : @wescpy/+wescpy
    Python training  consulting : CyberwebConsulting.com
    Core Python books : CorePython.com
    Python-flavored blog: wescpy.blogspot.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] 答复: Any book to study Python

2012-03-19 Thread Leam Hall

On 03/19/2012 09:36 PM, Yan, Xianming wrote:

Hello Russel,

Thanks for your recommendation and reply.


...

Xianming,

Wesley is a great help here as is Alan Gauld. One of the things I really 
like about the Python language is the experts who still help us new 
programmers.


Leam
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] 答复: Any book to study Python

2012-03-19 Thread Dave Angel

On 03/19/2012 09:36 PM, Yan, Xianming wrote:

snip
And to Brian vdB, I have my job need to do on windows platforms, and I 
installed python on a linux virtual machine hosted on my PC, so I can't 
copy/paste the code here. But it is a very good point that install the python 
interepter on Windows platform and copy/paste the code in the command line to 
run it directly, this will avoid some type error. Thanks for your suggestion!.



On this, and most forums, it's good form to put your comments *after* 
the part you're quoting.  What you did is called top-posting, and it 
makes the sequence out-of-order.



But the real reason i'm responding is to suggest that you can certainly 
cut and paste between virtual machine and host.  If you cannot on your 
particular setup, you should get it fixed.  If that's not feasible, you 
can always share files between the two, and do your copy/paste that way.


It's hard to imagine not having such capabilities.




--

DaveA

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] 答复: Any book to study Python

2012-03-19 Thread wesley chun
On Mon, Mar 19, 2012 at 6:36 PM, Yan, Xianming 
xianming@intercallapac.com wrote:


 I've bought the book named Python 核 心 编 程 (第二版) on www.dangdang.com. I
 guess I can get the book today.

 To Wesley, I did not realize you are the author of Python 核 心 编 程 (第二版)
 until I read the book's note online carefully and found your name. It's
 very exciting! You know this is the first time in my life that the book's
 author e-mail me. After I get it I shall start to read in my weekend and if
 there is any questions I shall write e-mail to you. Thanks again!



hi xian-ming,

i'm replying here to address dave angel's comment to reply *after* the
email (this is called bottom-posting so that people here can see what
your issue and context are. many people normally top-post or reply at the
beginning, but it is not as easy to read this when communicating in a
technical forum like this. i can even remove the parts of your message
which i am not responding to (like i did above).

about Python 核 心 编 程 (第二版) and my participation, thanks to you and Leam for
your kind remarks, however i am a Python user just like everyone else
here... the only difference is that i started using Python in 1997 which
gives me more experience. :-) i'm also a crazy engineer that is also
interested in *documentation* -- i know, i'm losing my reputation as a
developer now. 8|

i hope that the criticisms of the translator can be minimized (just watch
out for the bad code indentation), and that they were able to interpret
what i really wanted to say, otherwise you may have to find the English
one. i try to use easy-to-understand English, so it should not be *too*
bad. anyway, if you have more questions, please cut-n-paste your code here
along with the output, and everyone can help you more effectively.

谢谢!
--  wesley - 陈仲才
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A computer never does what you want... only what you tell it.
wesley chun : wescpy at gmail : @wescpy http://twitter.com/wescpy/
+wescpy http://plus.ly/wescpy
Python training  consulting : CyberwebConsulting.com
Core Python books : CorePython.com http://corepython.com/
Python-flavored blog: wescpy.blogspot.com
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor