newbie:trying to read in stdoutput of commands under various *nixes
fperez528 at yahoo.com
Wed Jul 14 00:09:07 CEST 2004
> I am fumbling around here, and it is getting quite late.
> I am doing something really simple - trying to write something that
> will get the results of a uname command to decide whether the system
> is Linux or OpenBSD in preparation for running a couple of commands
> that have different syntax on the different systems. I first started
> out doing os.name but quickly realised this wasn't what I was after.
> So I am trying stuff like:
In : import commands
In : commands.getoutput?
Base Class: <type 'function'>
String Form: <function getoutput at 0x9ec5fd4>
Return output (stdout or stderr) of executing cmd in a shell.
More information about the Python-list