[Python-de] system und StringIO
Roland M. Kruggel
rk.liste at bbf7.de
Son Apr 23 20:43:54 CEST 2006
Hallo Liste,
ich benötige die Ausgabe eines Programmes in einem Python Programm.
Meine momentane Lösung (kurzfassung):
os.system('progname > /tmp/file')
f = open('/tmp/file','r')
for line in f.readline()
...
Ist sehr unbefriedigend.
Kann ich system nicht dazu bewegen in einen StringIO Object zu
schreiben?
--
cu
Roland Kruggel mailto: rk.liste at bbf7.de
System: Intel 3.2Ghz, Debian etch, 2.6.15, KDE 3.5