You are not logged in.
what is the equivalent of perl's
$var=qx/command -option/;
in python?
ive tried os.spawnv() and os.popen2(), but its not quite what im looking for....
Offline
fd = os.popen('ls /home')
lines = string.split(fd.read, 'n')
Offline
thanks a bunch
Offline
fd = os.popen('ls /home')
lines = fd.read().splitlines()
arch + gentoo + initng + python = enlisy
Offline
fd = os.popen('ls /home') lines = fd.read().splitlines()
smartass
Offline
What about
lines = os.popen('ls /home').readlines()
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline
that one keep newlines sweiss, at least it did last time i tried it,
arch + gentoo + initng + python = enlisy
Offline
Oh, so the other one removes them automatically? Guess you just taught me something really useful
Thanks a lot.
Some PKGBUILDs: http://members.lycos.co.uk/sweiss3
Offline