Re: quick beginners List comprehension question

2009-01-21 Thread Srinivasa NL
You can try this import random class foo: def __init__(self): self.bar = random.randint(1,100) def getbar(ls,i): ls.append(foo()) ls[i].bar = ls[i].bar * 3 ls = [] [getbar(ls,i) for i in range(10)] On Thu, Jan 22, 2009 at 4:45 AM, Diez B. Roggisch de...@nospam.web.dewrote:

Re: drive a desktop app from python?

2009-01-08 Thread Srinivasa NL
You can use subprocess module to start an application and also read it's output. You can kill it yourself (when you know when to do it) Srinivas. On Fri, Jan 9, 2009 at 2:36 AM, Tim Arnold tim.arn...@sas.com wrote: Hi, I don't even know what to google for on this one. I need to drive a

Problem with py2exe

2008-10-15 Thread Srinivasa NL
Hi, I am having problem with running exe generated using py2exe. I wrote a simple script test.py which prints a line (e.g print 'Hello World') and generated an exe using py2exe. I used the command python setup.py py2exe. When I run the exe test.exe in the dist directory I get the error message