If what you want is something that scales up, then you're attacking
the Wrong Problem. Rather than focus on getting your thread overhead
as small as possible in order to support as much real-time concurrency
as you can, you should (as has been suggested) try to get
simulation-time concurrency with
On Windows it looks like msvcrt will give you a non-blocking terminal
read -- on mac / *nix systems it looks a little trickier:
http://mail.python.org/pipermail/pythonmac-sig/2004-February/010140.html
The os module in windows doesn't even have O_NONBLOCK. That seems like trouble.
m
On Sun, 20
I haven't tried the code, but it looks like you need to increment on
connection failures, too. I think it's more pythonic to iterate over
a range, as in the following
for test_port in range(start_port, end_port)
but it would suffice to just move the start_port+=1 outside of the try
_
The function's local variable L is not static, but "default argument
value" is, which is what the documentation means when it says that it
will evaluate these only once. When the default value is a list (in
your code, not "the empty list" but a list which happens to be empty
when the default argum
without the explicit newlines in file.write(i), could it be that the
file was closed before the write buffer was ever flushed?
mike
On Mon, 7 Feb 2005 14:58:03 -0500, Smith, Jeff <[EMAIL PROTECTED]> wrote:
> -Original Message-
> From: Alan Gauld [mailto:[EMAIL PROTECTED]
> Sent: Monday,
>num = num + math.pi/6.0 ## Don't forget .0 or you'll get an integer
the division operator returns a float when either of the operands are
floats -- in this case math.pi is, so you don't have to worry about
passing it 6.0 instead of 6
>>> import math
>>> math.pi
3.1415926535897931
>>> math.
Alternatively, you could .split() your string and not invoke the
mechanisms dealing with regular expressions.
Is this considered stylistically sloppy in the event that the split
results in a very long array? Sloppier than REs are to begin with?
I think that the problem with [\A\d] is that \A is