getting strings from the shell commands

Sarcar, Shourya C (MED) Shourya.Sarcar at med.ge.com
Fri Dec 21 13:43:16 EST 2001


i have a shell script which prints some strings on the stdout. how can i
get those strings without having to open and parse a (tmp) file from
python

<script>
#!/bin/sh
echo $1 # print something
</script>

I want to do something in python LIKE

os.system("./myscript") but how can i get the out put into a [list of]
strings

shourya




More information about the Python-list mailing list