[Tutor] telnetlib - character hex00 missing

2010-11-22 Thread Joachim Roop
Even though my non-python telnet-server on the other side is sending #00-bytes, they are not recognized by python's telnetlib (characters #01-#FF seem to work fine though). My C++ implementation has no problems with this. I have to use Python 3.1 on Windows. I'm guessing this a known bug. What

Re: [Tutor] Lambda function, was: Simple counter to determine frequencies of words in adocument

2010-11-22 Thread Josep M. Fontana
Thanks Alan and Emile, >> By the way, I know what a lambda function is and I read about the key >> parameter in sorted() but I don't understand very well what >> "key=lambda item: item[1]" does. ... >> What I don't understand is the syntax of "item : item[1]". > ... Alan says: > So reverse eng

Re: [Tutor] telnetlib - character hex00 missing

2010-11-22 Thread Alan Gauld
"Joachim Roop" wrote Even though my non-python telnet-server on the other side is sending #00-bytes, they are not recognized by python's telnetlib (characters #01-#FF seem to work fine though). My C++ implementation has no problems with this. I have to use Python 3.1 on Windows. I'm guessi

[Tutor] IDEs

2010-11-22 Thread Josep M. Fontana
Alan gave me this piece of advice in his response to another message I sent to the list. Since the topic is a bit different from the one in the original message, I think it is better to start a different thread. > Don;t run your code inside the IDE except for testing. IDEs are > Development Enviro

Re: [Tutor] Lambda function, was: Simple counter to determine frequencies of words in adocument

2010-11-22 Thread ALAN GAULD
> What I don't understand is the nature of the term 'item'. Is it a > variable? Yes, its just a descriptive name. You could have used x just as easily, Python doesn't know, nor care. It is just like in defining any normal function def f(x): return x is exactly the same as: def f(data): ret

Re: [Tutor] telnetlib - character hex00 missing

2010-11-22 Thread Steven D'Aprano
Joachim Roop wrote: Even though my non-python telnet-server on the other side is sending #00-bytes, they are not recognized by python's telnetlib (characters #01-#FF seem to work fine though). My C++ implementation has no problems with this. I have to use Python 3.1 on Windows. I'm guessing

Re: [Tutor] IDEs

2010-11-22 Thread Marc Tompkins
On Mon, Nov 22, 2010 at 1:13 AM, Josep M. Fontana wrote: > Alan gave me this piece of advice in his response to another message I > sent to the list. Since the topic is a bit different from the one in > the original message, I think it is better to start a different > thread. > > > Don;t run your

Re: [Tutor] IDEs

2010-11-22 Thread Steven D'Aprano
Josep M. Fontana wrote: Don;t run your code inside the IDE except for testing. IDEs are Development Environments, they are not ideal for executing production code. Run your file from the Terminal command prompt directly. I thought the code was not run inside the IDE but it was run by Python in

Re: [Tutor] IDEs

2010-11-22 Thread Alan Gauld
"Josep M. Fontana" wrote Don;t run your code inside the IDE except for testing. IDEs are Development Environments, they are not ideal for executing production code. Run your file from the Terminal command prompt directly. I thought the code was not run inside the IDE but it was run by Pyth

[Tutor] Fw: Installing Pyserial for Python27 on Win 7

2010-11-22 Thread ALAN GAULD
Forwarding to the list Please send list mail to tutor@python.org not tutor-owner... - Forwarded Message > From: John Smith > To: tutor-ow...@python.org > Sent: Monday, 22 November, 2010 19:29:37 > Subject: Installing Pyserial for Python27 on Win 7 > > My OS is Win 7. I have the 64-bit

Re: [Tutor] Fw: Installing Pyserial for Python27 on Win 7

2010-11-22 Thread Emile van Sebille
See http://sourceforge.net/tracker/index.php?func=detail&aid=2921957&group_id=46487&atid=446302 where it's explained that this bug won't get fixed, but that you can install from sources. Emile On 11/22/2010 1:08 PM ALAN GAULD said... Forwarding to the list Please send list mail to tutor@pyt

Re: [Tutor] Fw: Installing Pyserial for Python27 on Win 7

2010-11-22 Thread Emile van Sebille
On 11/22/2010 3:05 PM John Smith said... Hi, Emile - Install from sources? What is that? see http://pyserial.sourceforge.net/pyserial.html#installation the From Source section. I'm not sure what else may be required but it should help get you started. Emile I searched for that phrase bu

Re: [Tutor] Fw: Installing Pyserial for Python27 on Win 7

2010-11-22 Thread John Smith
So, let's see Serial communications does not come with Python so a separate package has to be installed. Okay, but the pyserial Windows installer will not work in Windows 7 and will not be fixed. So, a source install is required. I _assume_ the source is the one that is a tar.gz thingy. S