[python-win32] problems with subprocess module and env parameter

Bill Janssen janssen at parc.com
Fri Apr 16 00:27:51 CEST 2010


Preston Landers <planders at gmail.com> wrote:

> Your PATH is a Unicode string.  I'm not sure offhand if that's acceptable or
> not, but all the rest of the strings appear to be regular (non-unicode)
> strings.
> 
> You could also try:
> 
> import types
> for k, v in env.iteritems():
>     if type(v) is not types.StringType:  print k, v
> 
> hope this helps,
> -Preston

Ah, great!  Thanks, Preston.  That was it.  Once I'd crunched all the
values to non-Unicode, it worked.  Hmmm, I'd think maybe the
CreateProcess code would do that kind of normalization, or at last raise
a more comprehensible error.

Bill


More information about the python-win32 mailing list