cool, thanks again
sk
On Fri, May 29, 2009 at 5:09 PM, Alan Gauld wrote:
>
> "vince spicer" wrote
>>
>> import commands
>> output = commands.getout("ls -lah")
>
> There are many ways to do this in Python including os.popen, commands and
> subprocess.
>
> But subprocess is the "officially correct
"vince spicer" wrote
import commands
output = commands.getout("ls -lah")
There are many ways to do this in Python including
os.popen, commands and subprocess.
But subprocess is the "officially correct" version, the others
are deprecated and could theoretically disappear in a future
ver
kick butt, gents, thanks a lot
sk
On Fri, May 29, 2009 at 4:39 PM, W W wrote:
> On Fri, May 29, 2009 at 4:27 PM, shawn bright wrote:
>>
>> Hey all
>>
>> I have a small program that when run from the command line, will
>> return a certain value for an arguement. Like this:
>>
>> > mfetchz 45
>> >
On Fri, May 29, 2009 at 4:27 PM, shawn bright wrote:
> Hey all
>
> I have a small program that when run from the command line, will
> return a certain value for an arguement. Like this:
>
> > mfetchz 45
> > 45j
>
> so the program is mfetchz and the argument is 45
>
> i know i can call the program
Sorry *output
import commands
> output = commands.getoutput("ls -lah")
> Vince
>
>
> On Fri, May 29, 2009 at 3:27 PM, shawn bright wrote:
>
>> Hey all
>>
>> I have a small program that when run from the command line, will
>> return a certain value for an arguement. Like this:
>>
>> > mfetchz 4
import commands
output = commands.getout("ls -lah")
Vince
On Fri, May 29, 2009 at 3:27 PM, shawn bright wrote:
> Hey all
>
> I have a small program that when run from the command line, will
> return a certain value for an arguement. Like this:
>
> > mfetchz 45
> > 45j
>
> so the program is mfet
Hey all
I have a small program that when run from the command line, will
return a certain value for an arguement. Like this:
> mfetchz 45
> 45j
so the program is mfetchz and the argument is 45
i know i can call the program with os.system("mfetchz 45")
but how do i get the return?
The OS is lin