Set environment variables for command

26 views
Skip to first unread message

Ram Rachum

unread,
Mar 30, 2014, 1:16:09 PM3/30/14
to python...@googlegroups.com
Is it possible to use Sarge to run a command with certain environment variables? (Without manually prepending the command with `export`...)


Thanks,
Ram.

Vinay Sajip

unread,
Mar 30, 2014, 2:10:14 PM3/30/14
to python...@googlegroups.com
You should be able to use env=... as a kwarg, just as with subprocess.Popen; note that sarge currently adds the existing os.environ variables for you (so it's straightforward to add or change environment variables for the subprocess, but not to remove them).


________________________________
From: Ram Rachum <ram.r...@gmail.com>
To: python...@googlegroups.com
Sent: Sunday, 30 March 2014, 18:16
Subject: Set environment variables for command

Is it possible to use Sarge to run a command with certain environment variables? (Without manually prepending the command with `export`...)


Thanks,
Ram.
--
You received this message because you are subscribed to the Google Groups "sarge" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-sarge...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ram Rachum

unread,
Mar 30, 2014, 2:13:19 PM3/30/14
to python...@googlegroups.com
Thanks! I suggest adding this to the `run` docstring.


You received this message because you are subscribed to a topic in the Google Groups "sarge" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/python-sarge/ZC0rXs6XW_w/unsubscribe.
To unsubscribe from this group and all its topics, send an email to python-sarge...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages