Re: Converting a script to Python 3 - having trouble.

2009-09-15 Thread Russell Jackson
Yes, I don't think the problem is that isn't running the command, I think it is just that I don't know how to communicate with it in the way that I need to in order to make this work. I have tried finding examples of working with Popen, but they are few and far between. I am not sure what was wrong

Re: Converting a script to Python 3 - having trouble.

2009-09-15 Thread Chris Rebert
On Tue, Sep 15, 2009 at 5:07 PM, Chris Rebert wrote: > On Tue, Sep 15, 2009 at 4:01 PM, Russell Jackson > wrote: > >> Attempted code in Python 3: (Doesn't work either) > >>         cmd = ' passwd {0}'.format(user) >>         pipe = Popen(p4 + cmd, shell=True, stdin=PIPE, stdout=PIPE, >> stderr=

Re: Converting a script to Python 3 - having trouble.

2009-09-15 Thread Chris Rebert
On Tue, Sep 15, 2009 at 4:01 PM, Russell Jackson wrote: > Attempted code in Python 3: (Doesn't work either) >         cmd = ' passwd {0}'.format(user) >         pipe = Popen(p4 + cmd, shell=True, stdin=PIPE, stdout=PIPE, > stderr=PIPE, universal_newlines=True) You're not specifying the command