AW: [Python-de] variable in os.popen

hallihallo,
Meinst du vieleicht sowas: for f_name in f: cmdLine="nm my_file.elf | egrep %s | gawk '{ print $3\":0x\"$1 }'" % f_name d_funct[]=os.popen(cmdLine).readlines()
jow, mit dem cmd-befehl habe ich schonmal geliebaeugelt nur noch nicht ausprobiert. ich denke damit duerfte es gehn, versuche ich nach dem einwurf!
Was macht eigentlich d_funct[]=my_result? Ist das ein Tipfehler oder gibt's 'nen Unterschied zu d_funct=my_result? Ist das sowas wie d_funct+=... nur, daß die Daten am Anfang angefügt werden?
nein, war nur eine unklare formulierung, sorry muesste eigentlich sowas stehn: d_funct.append().os.popen(cmdLine).readlines() gruss josh _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de

On Thu, Nov 11, 2004 at 11:18:16AM +0100, Johannes Krauth wrote:
hallihallo,
[cut]
nein, war nur eine unklare formulierung, sorry muesste eigentlich sowas stehn:
d_funct.append().os.popen(cmdLine).readlines()
Das sieht kommisch aus. Wenn alle Zeilen immern an in eine Liste eingefügt werden sollen, dann vielleicht das: all=[] for xxx: all.extend(xxx.readlines()) Gruß, Thomas -- Thomas Guettler <guettli@thomas-guettler.de> http://www.thomas-guettler.de _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
participants (2)
-
Johannes Krauth
-
Thomas Guettler