problem with python script

Posted by hidayat on Stack Overflow See other posts from Stack Overflow or by hidayat
Published on 2010-06-09T13:55:10Z Indexed on 2010/06/09 14:22 UTC
Read the original article Hit count: 264

Filed under:
|
|

I want to run a csh file from a python scrip,

example,

#!/usr/bin/python
import os

os.system("source path/to/file.csh")

and I want this file to run in the same shell as I am running the python script, because the file.csh script is settings some environment variables that I need.

Does anyone know how to do this in Python?

© Stack Overflow or respective owner

Related posts about python

Related posts about beginner