View Single Post
Old 12-10-2012, 07:36 AM   #168
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 26,435
Karma: 5383257
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You'd need to create the lpEnvironment and pass it to createprocess. Something like

env = os.environ.copy()
# remove the calibre path from env['PATH']

raw = u'\0'.join(u'%s=%s'%(k, v) for k, v in env.iteritems())

Then pass raw as lpEnvironment to CreateProcess and remember to set CREATE_UNICODE_ENVIRONMENT in the dwCreationFlags
kovidgoyal is online now   Reply With Quote