Re: Unicode File Names

2008-10-16 Thread Seun Osewa
Try Python 3. Python 3 strings are native by default, so the os.listdir() in Python 3 should support the Japanese characters. On Oct 17, 1:43 am, Jordan [EMAIL PROTECTED] wrote: I've got a bunch of files with Japanese characters in their names and os.listdir() replaces those characters with

Re: xor: how come so slow?

2008-10-15 Thread Seun Osewa
My answer is: never do things like this with python. You will find this module useful: www.pycrypto.org On Oct 15, 12:19 pm, Michele [EMAIL PROTECTED] wrote: Hi, I'm trying to encode a byte data. Let's not focus on the process of encoding; in fact, I want to emphasize that the method

Re: The Future of Python Threading

2007-08-22 Thread Seun Osewa
Yes, but if you reduce the coupling between threads in Java (by using the recommended Python approach of communicating with Queues) you get the full speed of all the cores in your CPU. i wonder why we can't have this in Java; it will be very good for servers! As for Java, making code thread

Re: subprocess (spawned by os.system) inherits open TCP/UDP/IP port

2007-08-21 Thread Seun Osewa
Is it possible to cause this sort of thing to happen on Windows. Specifically, I'm looking for a way to cause multiple processes to accept new connections on a bound socket. on UNIX, I can just fork() after binding the server socket to a port and the children can accept() on that same socket, but

Re: The Future of Python Threading

2007-08-13 Thread Seun Osewa
On Aug 11, 12:59 pm, Kay Schluehr [EMAIL PROTECTED] wrote: Have you checked out the processing [1] package? I've currently the impression that people want to change the whole language before they checkout a new package. It would be nice to read a review.

Re: The Future of Python Threading

2007-08-10 Thread Seun Osewa
I think I've heard Guido say the last attempt at removing the Global Interpreter Lock (GIL) resulted in a Python that was much slower... What is it about Python that makes a thread-safe CPython version much slower? Why doesn'ttrue threading slow down other languages like Perl and Java? I'm

Simple Threading Example Doesn't Work (2.5.1)

2007-06-12 Thread Seun Osewa
Hello, I've tried to run several threading examples in Python 2.5.1 (with Stackless) For example: import threading theVar = 1 class MyThread ( threading.Thread ): def run ( self ): global theVar print 'This is thread ' + str ( theVar ) + ' speaking.'