Brant Sears wrote:
> Hi. I'm new to Python and I am trying to use the latest release (2.5) on
> Windows XP.
>
> What I want to do is execute a program and have the results of the
> execution assigned to a variable. According to the documentation the way
> to do this is as follows:
>
> import comm
Brant Sears wrote:
> Any ideas on what I might do to troubleshoot this?
As other stated out, you are using the wrong module. Try:
>>> import os
>>> p=os.popen('dir')
>>> for l in p:
... print l
...
--- OUTPUT OF DIR HERE ---
>>> p.close()
The return value of close is the return value of the c
Brant Sears wrote:
> Hi. I'm new to Python and I am trying to use the latest release (2.5)
> on Windows XP.
>
> What I want to do is execute a program and have the results of the
> execution assigned to a variable. According to the documentation the
> way to do this is as follows:
>
> import comman
At Wednesday 20/9/2006 19:49, Brant Sears wrote:
Hi. I'm new to Python and I am trying to use the latest release (2.5)
on Windows XP.
What I want to do is execute a program and have the results of the
execution assigned to a variable. According to the documentation the
way to do this is as foll
Hi. I'm new to Python and I am trying to use the latest release (2.5)
on Windows XP.
What I want to do is execute a program and have the results of the
execution assigned to a variable. According to the documentation the
way to do this is as follows:
import commands
x = commands.getstatusou