> Again another great suggestion. I was not aware of the
> multiprocessing module, and I'm not (yet) sure if I understand why I
> should use instead of multithreading as explained by a previous post.
http://docs.python.org/library/multiprocessing.html
First paragraph...
--
Thanks,
--Minesh
--
>
> Any ideas? comments on code welcome also.
Here's something that I would probably do, there may be better ways.
This only works on python2.6 for the terminate() method.
import signal
import subprocess
def timeout_handler(signum, frame):
print "About to kill process"
p.terminate()
fo
On Fri, Jun 5, 2009 at 10:20 AM, Tom wrote:
> On Fri, 5 Jun 2009 04:07:19 + (UTC), kj
> wrote:
>
>>
>>
>>Suppose I have two lists, list_a and list_b, and I want to iterate
>>over both as if they were a single list. E.g. I could write:
>>
>>for x in list_a:
>> foo(x)
>>for x in list_b:
>>
> Not as best I can tell. From my /usr/lib/python2.5/ConfigParser.py file,
> around line 441:
>
> if line[0].isspace() and cursect is not None and optname:
> value = line.strip()
> if value:
> cursect[optname] = "%s\n%s" % (cursect[optname], value)
>
> That "value = line.strip()" is wh
I am using ConfigParser to parse a config file and I want to maintain
the newlines, how is it possible. Example given below. BTW, is there
an alternative to configParser, should I use 'exec' instead. Is there
any support for yaml built-in or possibly in the future?
test.cfg
[Foo_Secti
On Mon, May 4, 2009 at 2:01 PM, Piet van Oostrum wrote:
>> gganesh (g) wrote:
>
>>g> Hi friends,
>>g> I suppose sendmail() can send mails one by one ,how to send mails
>>g> concurrently ,
>>g> It would be very grateful,if someone could point out a solution.
>
You can always use twisted which
used for spawning a shell command, piping,
etc...
--
Thanks,
Minesh Patel
--
http://mail.python.org/mailman/listinfo/python-list
t right away and does not have to
> wait for pkts=sniff(...) to finish.
>
> Any ideas?
Why not use os.fork(), it is the same as C's fork?
if os.fork(): # Returns 0 to child, non-zero to parent
# Do parent stuff
else:
# Do child stuff
--
Thanks,
Minesh Patel
--
http://mail.python.org/mailman/listinfo/python-list
On Mon, Mar 9, 2009 at 3:17 PM, Chris Rebert wrote:
> On Mon, Mar 9, 2009 at 3:05 PM, Minesh Patel wrote:
>> Is there a way for multiple tasklets to run in parallel?
>
> Seems doubtful (though I'm not an expert).
>
> From the Wikipedia article: "Stackless
Is there a way for multiple tasklets to run in parallel? I have been
following the examples in
http://members.verizon.net/olsongt/stackless/why_stackless.html but it
seems that tasklets block for data or are scheduled and there is no
way to run them concurrently.
--
Thanks,
Minesh Patel
--
http
On Fri, Mar 6, 2009 at 3:16 PM, Jean-Paul Calderone wrote:
> On Fri, 6 Mar 2009 14:50:51 -0800, Minesh Patel wrote:
>>
>> I am trying to figure out the best approach to solve this problem:
>>
>> I want to poll various directories(can be run in the main thread).
>&
the help,
Minesh Patel
--
http://mail.python.org/mailman/listinfo/python-list
Hi,
I was wondering if there is any patch management module for Python.
Basically I am looking to only apply a hunk from a patch if the file
exists.
--
Thanks,
Minesh
--
http://mail.python.org/mailman/listinfo/python-list
13 matches
Mail list logo