Re: profiling a C++ python extension

2007-07-11 Thread Gal Diskin
e developers and a lot of example code in the released kits). Hope this helps, Gal Diskin -- http://mail.python.org/mailman/listinfo/python-list

Re: subprocess popen trouble

2007-07-10 Thread Gal Diskin
ing at a lot of examples and a lot of different postings, and can't see any mistakes in my use of subprocess. I would really appreciate it if somebody could see where I am going wrong. Thank you, Nik -- Gal Diskin -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating over several lists at once

2006-12-27 Thread Gal Diskin
On Dec 13, 3:47 pm, "Gal Diskin" <[EMAIL PROTECTED]> wrote: > Hi, > I am writing a code that needs to iterate over 3 lists at the same > time, i.e something like this: > > for x1 in l1: > for x2 in l2: > for x3 in l3: > print &q

Re: Iterating over several lists at once

2006-12-13 Thread Gal Diskin
drik Lundh" <[EMAIL PROTECTED]> wrote: > "Gal Diskin" wrote: > > I am writing a code that needs to iterate over 3 lists at the same > > time, i.e something like this: > > > for x1 in l1: > >for x2 in l2: > >for x3 in l3: > >

Re: Iterating over several lists at once

2006-12-13 Thread Gal Diskin
oduct, but without actually doing all n for loops but using a single "for" loop. Thanks for replying me. On Dec 13, 3:58 pm, Roberto Bonvallet <[EMAIL PROTECTED]> wrote: > Gal Diskin wrote: > > Hi, > > I am writing a code that needs to iterate over 3 lists at the sa

Iterating over several lists at once

2006-12-13 Thread Gal Diskin
Hi, I am writing a code that needs to iterate over 3 lists at the same time, i.e something like this: for x1 in l1: for x2 in l2: for x3 in l3: print "do something with", x1, x2, x3 What I need to do is go over all n-tuples where the first argument is from the first list,

Re: building strings from variables

2006-10-07 Thread Gal Diskin
late.replace which is much slower by rate of about 15x. When it comes to choosing between using template.replace or "%(varname)s ..." % globals() my preference is for the latter without a doubt. -- Gal Diskin [EMAIL PROTECTED] [EMAIL PROTECTED] Work: +972-4-865-1637 Cell: +972-54-7594166 -- http://mail.python.org/mailman/listinfo/python-list

Re: building strings from variables

2006-10-07 Thread Gal Diskin
Matthew Warren wrote: > > -Original Message- > > From: > > [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] > > rg] On Behalf Of Gal Diskin > > Sent: 05 October 2006 16:01 > > To: python-list@python.org > > Subject: building strings from

building strings from variables

2006-10-05 Thread Gal Diskin
Following a discussion with an associate at work about various ways to build strings from variables in python, I'd like to hear your opinions and preferred methods. The methods we discussed are: 1. some_string = "cd %s ; %s %d %s %s" % ( working_dir, ssh_cmd, some_count, some_param1, some_param2)

Re: threading, subprocesses and wait

2006-09-26 Thread Gal Diskin
Jean-Paul Calderone wrote: > On 26 Sep 2006 06:29:17 -0700, Gal Diskin <[EMAIL PROTECTED]> wrote: > >Hi all, > >I'm writing a python program using threads to open several subprocesses > >concurrently (using module subprocess) and wait on them. I was > >won

threading, subprocesses and wait

2006-09-26 Thread Gal Diskin
Hi all, I'm writing a python program using threads to open several subprocesses concurrently (using module subprocess) and wait on them. I was wondering if there is a possibilty that a thread will return from wait even though the subprocess that finished was created by another thread thats also wai

Re: ultra newbie question (don't laugh)

2006-09-26 Thread Gal Diskin
John Salerno wrote: > Ok, I've decided to make a little project for myself which involves > storing employee information in an XML file. I'm doing this partly to > experiment with working with XML. The blocks in the file will look > something like this: > > >John >Salerno >United State