Can't write to a directory made w/ os.makedirs

Tim Golden mail at
Mon Jan 2 06:11:27 EST 2012

On 02/01/2012 03:14, David Goldsmith wrote:
> Here's my script, in case that helps:

It certainly does. A few things occur to me.

First, you
shouldn't need to double-quote the path; the
should do that for you as long as you're using the list
version of the param -- which you are.

Second, you almost certainly don't want to be using the
env param, at least not in the way you are. Depending on
the way in which your app runs, either pass the appropriate
directory as the cwd= param, or copy and override the
current environ dict, ie either do this: (
   ['c:/program files/somewhere/app.exe', 'blah1', 'blah2'],

or this:

env = dict (os.environ)
env['PATH'] = "c:/somewhere/else"
# or env['PATH'] += ";c:/somewhere/else" (
   ['c:/program files/somewhere/app.exe', 'blah1', 'blah2'],

See if any of that helps


More information about the Python-list mailing list