Hi,
I've developed what would be my largest Python app to date. And, going
from the crude Windows Task Manager, it's trying to use as much CPU
time as it can get when it's idle.
This, no doub,t is due to my design.
I have an UDP socket server, a packet cruncher, and a DAO.
Each resides in it's
Hi,Can someone explain me function and caller relationship when passing arguments?Thanks
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.___
Tutor maillist - Tutor@python.org
Hi,
Can someone tell me what the r before the expression means, as in
re.compile(r'(\.exe|\.zip|\.pif|\.scr|\.ps|\.pdf|\.ppt)$')?
I've seen regular expressions both ways, and I've seen them work with or
without the r. Just wondering what it does, or if it makes a difference.
Thanks.
Liam Clarke wrote:
Hi,
I've developed what would be my largest Python app to date. And, going
from the crude Windows Task Manager, it's trying to use as much CPU
time as it can get when it's idle.
This, no doub,t is due to my design.
I have an UDP socket server, a packet cruncher, and
Liam Clarke wrote:
Each thread's run() method basically looks like this -
while True:
try:
data = self.queue.get(False)
self.DAO.send_data(data)
except Empty:
if self.shutdown:
print \DAO
josip wrote:
Can someone explain me function and caller relationship when passing
arguments?
Hi... what do you mean? Is there something specific you're not getting
if you take a look at:
http://www.ibiblio.org/obp/thinkCSpy/chap03.htm
Carlos Benevides wrote:
Hi,
Can someone tell me what the r before the expression means, as in
re.compile(r'(\.exe|\.zip|\.pif|\.scr|\.ps|\.pdf|\.ppt)$')?
It is not specific to regular expressions, it is called a raw string.
http://docs.python.org/tut/node5.html
Hello,
I'm trying to replace some strings in a line of text,
using some regex functions. My question is: If there's
more then one regex grouping I want to replace in one
line of a file, how can I use the String Formatting
operator (%s) in two places?
Here's the line it matches in the file:
Jerome Jabson wrote:
Hello,
I'm trying to replace some strings in a line of text,
using some regex functions. My question is: If there's
more then one regex grouping I want to replace in one
line of a file, how can I use the String Formatting
operator (%s) in two places?
Hi Jerome,
I
Hugo González Monteverde wrote:
You are not using the optional timeout and blocking which 'get' provides (!)
Try setting it and see your CPU usage go down. This will implement
blocking, and the queue will be used as soon as data is there.Set
block
to True and a timeout if you
My problem now is how do I construct the replace
statement?
twork = m_sock.sub('\1 %s \2 %s', % port_num % proto,
twork)
The format operator takes a tuple:
twork = m_sock.sub('\1 %s \2 %s' % (port_num, proto), twork)
So I removed the comma after the string, used a single percent
operator
Hi,
Hi,
Can someone explain me function and caller relationship when passing
arguments?
There is an explanation of this in vitually any tutorial on Python.
Haver you read any of these? Have you any experience in other
languages that we can relate an explanation too?
For example, you
Hi Kent,
Sorry I didn't make my question clearer. Bascially I
want to replace this line:
srm:socket portNumber=138 tcpORudp=UDP
address=64.41.134.60/
With:
srm:socket portNumber=2 tcpORudp=TCP
address=64.41.134.60/
So the regex grouping are that I want to keep
portNumber= and tcpORudp= and
Jerome Jabson wrote:
Hi Kent,
Sorry I didn't make my question clearer. Bascially I
want to replace this line:
srm:socket portNumber=138 tcpORudp=UDP
address=64.41.134.60/
With:
srm:socket portNumber=2 tcpORudp=TCP
address=64.41.134.60/
So the regex grouping are that I want to
On Fri, 7 Apr 2006, Kent Johnson wrote:
Hugo Gonz�lez Monteverde wrote:
You are not using the optional timeout and blocking which 'get' provides (!)
Try setting it and see your CPU usage go down. This will implement
blocking, and the queue will be used as soon as data is there.
Greetings:
I'm not certain this is the right forum for this question. If not, please
point me to the correct one.
I am using the unittest module to test a package our team is writing. I
presently have three modules of test cases and a top level module to run the
entire suite. The
Carroll, Barry wrote:
Greetings:
I'm not certain this is the right forum for this question. If not,
please point me to the correct one.
I am using the unittest module to test a package our team is writing.
I presently have three modules of test cases and a top level module to
run the
On 7 Apr 2006, [EMAIL PROTECTED] wrote:
Sorry I didn't make my question clearer. Bascially I
want to replace this line:
srm:socket portNumber=138 tcpORudp=UDP
address=64.41.134.60/
With:
srm:socket portNumber=2 tcpORudp=TCP
address=64.41.134.60/
So the regex grouping are that I want
Thanks very much all. :) I'll have a crack this afternoon and let you know.
Kent - the increase in the queue size for the socket server is to
allow for any delay in processing packets; it has a default queue size
of 5 and then it starts rejecting packets; more of a safety policy
when reducing CPU
Kent:
I just rechecked my class names, and there are no duplicates. I was
careful to preface all of the classes in testsymc39 with 'C39...', and
used 'S25...' in testsym25. Likewise, the classes in each module have
names that describe the type of data being tested, so names are unique
within
Why is it that when one variable is assigned a value in terms of another variable, assigning a new value to the first doesn't change the value of the second? This is giving me a huge headache, since I have a bunch of variables defined in terms of one another, and I want to be able to dynamically
On Fri, 7 Apr 2006, Jesse wrote:
Why is it that when one variable is assigned a value in terms of another
variable, assigning a new value to the first doesn't change the value of
the second?
Hi Jesse,
If you have a variable that depends on the values of other parameters,
that's just
Jesse wrote:
Why is it that when one variable is assigned a value in terms of
another variable, assigning a new value to the first doesn't change
the value of the second? This is giving me a huge headache, since I
have a bunch of variables defined in terms of one another, and I want
to be
Kent:
-Original Message-
From: Kent Johnson [mailto:[EMAIL PROTECTED]
Sent: Friday, April 07, 2006 3:59 PM
To: Carroll, Barry
Subject: Re: [Tutor] Unittest not running all test cases
Carroll, Barry wrote:
Kent:
I just rechecked my class names, and there are no duplicates. I
Hi Tutors!
I have a problem that I've solved using Python, and I want to know if
I've done a good job :-)
Here's the problem:
At my work we have a Windows network. On a network drive lives a program
that a couple people need to access (there's a shortcut on each user's
Desktop to the
-- Forwarded message --
Date: Fri, 7 Apr 2006 21:05:33 -0600
From: Jesse [EMAIL PROTECTED]
To: Danny Yoo [EMAIL PROTECTED]
Subject: Re: [Tutor] Beginner question (variables, namespaces...)
I tried redefining the higher-order variables as functions, but it didn't
quite work.
26 matches
Mail list logo