Returning Values from Bash Scripts

William Park opengeometry at yahoo.ca
Sun Jan 8 02:08:16 CET 2006


chakkaradeepcc at gmail.com wrote:
> HI all,
> 
> How to execute bash scripts from python (other than using os.popen) and
> get the values that those bash scripts return.
> 
> I would be happy if someone could help me out in this..

Well, if stdout is not an option, then save it to file (text, GDBM,
Python source format, etc) and read it back in Python.

-- 
William Park <opengeometry at yahoo.ca>, Toronto, Canada
ThinFlash: Linux thin-client on USB key (flash) drive
	   http://home.eol.ca/~parkw/thinflash.html
BashDiff: Super Bash shell
	  http://freshmeat.net/projects/bashdiff/



More information about the Python-list mailing list