Re: convert n-byte string into integer

2010-04-28 Thread Maligree
On Apr 28, 11:03 pm, MRAB wrote: > Maligree wrote: > > Hello there. > > > Since this is one of those problems that may have some painfully > > simple solution that will make me feel like a fool, I'll start of with > > this: it's _very_ late (.. yeah, i

convert n-byte string into integer

2010-04-28 Thread Maligree
Hello there. Since this is one of those problems that may have some painfully simple solution that will make me feel like a fool, I'll start of with this: it's _very_ late (.. yeah, it's not). To the point. Data returned by socket.recvfrom is a string. Obviously one that most of the time will co

threading and signals - main thread solely responsible for signal handling?

2010-02-13 Thread Maligree
The main part of my script is a function that does many long reads (urlopen, it's looped). Since I'm hell-bent on employing SIGINFO to display some stats, I needed to run foo() as a seperate thread to avoid getting errno 4 (interrupted system call) errors (which occur if SIGINFO is received while u