Hi I am trying to run a python script which has this code snippet:

process = subprocess.Popen('./start_ws.pl')

The perl script started changes environmental variables and
enters into new subshell.
After entering into new subshell, the commands below script


goes unnoticed.They get executed only if i exit from subshell(created by pl script).
The system command 'make' is executable only in new subshell.

I tried like,

pid = os.fork()

if pid > 0:
  os.system('make clean')


Even this doesnt work.

Kindly help me to run 'make' command in same env created by 'start_ws.pl' perl script.

After the subprocess exits, the environment is "gone".

So theoretically you have the following options:

I know, this does not solve your problem, but I have to go...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.