I\'m using Python to call bash to execute another bash script:
begin = int(sys.argv[1])
result = os.system(\"/tesladata/isetools/cdISE.bash %s\" %begin)
Actually, result
is only the return status as an integer. The thing you're calling writes to stdout, which it inherits from your program, so you're seeing it printed out immediately. It's never available to your program.
Check out the subprocess module docs for more info:
http://docs.python.org/library/subprocess.html
Including capturing output, and invoking shells in different ways.