Converting a script to Python 3 - having trouble.

Chris Rebert clp2 at rebertia.com
Wed Sep 16 02:11:59 CEST 2009


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

Scratch that, I neglected to notice the shell=True option.

Cheers,
Chris



More information about the Python-list mailing list