Re: socket.AF_INET

2008-04-20 Thread Juergen Perlinger
Matt Herzog wrote: > Hi All. > > I'm trying to write a script that will send me an email message when my IP > address changes on a specific NIC. On Linux, the script works. On FreeBSD, > it fails with: > > [snip] > > def get_ip_address(ifname): > s = socket.socket(socket.AF_INET, socket.SOC

Re: What happened with python? messed strings?

2008-04-20 Thread Juergen Perlinger
[EMAIL PROTECTED] wrote: > > Hi, > I used extensively python and now I find this mess with strings, > I can't even reproduce tutorial examples: "apfel".encode('utf-8') (it was with umlaut) > File "", line 0 > > ^ > SyntaxError: 'ascii' codec can't decode byte 0xc4 in position 1:

Re: What happened with python? messed strings?

2008-04-20 Thread Juergen Perlinger
Juergen Perlinger wrote: > [EMAIL PROTECTED] wrote: > [snip] > Basically you're not using ASCII encoding in your source text... You need > to define an encoding for your source if you're using german umlauts or > other fancy stuff. > > See chapter 2.1.4 of th

Re: What happened with python? messed strings?

2008-04-20 Thread Juergen Perlinger
Jason Scheirer wrote: [snip] > > It's true -- decorators, the class/type cleanup, properties, -= and > +=, list comprehensions, generators, distutils, and all the new > modules in the standard library are completely, entirely useless. > Python SHOULD have stayed at 1.5. totally OT, but just a few

Re: SWIG C++ std::cout do not output to interactive interpreter IDLE

2008-04-22 Thread Juergen Perlinger
[EMAIL PROTECTED] wrote: > Dear All, > > I have some functions written in C++, which I try to approach from > python using swig. In the C++ functions I use std::cout to print stuff > to output. Everything works fine, but the only problem that I have is > that when I start IDLE and use the functio