run multiple shell commands with previous state?

Joined
May 15, 2009
Messages
1
Reaction score
0
Hi,

I am trying to replace a batch file with a python script. But my issue is if I call subprocess.call to issue a shell command when its done the state is lost. Meaning the call is esentially stateless. So if my first call changed the cwd or set a variable; in my next call those state changes would not be there.

I assume this must be a common thing and I am just missing something. Please any help would be much appreciated. I have search around google for a while with no luck.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top