saranwrap.py: fix to use the current Python executable, not the default one

This commit is contained in:
Denis Bilenko
2009-05-19 23:20:48 +07:00
parent a0c8c7c57a
commit dc680acc35

View File

@@ -123,9 +123,9 @@ def wrap(obj, dead_callback = None):
return wrap_module(obj.__name__, dead_callback)
pythonpath_sync()
if _g_debug_mode:
p = Process('python', [__file__, '--child', '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback)
p = Process(sys.executable, [__file__, '--child', '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback)
else:
p = Process('python', [__file__, '--child'], dead_callback)
p = Process(sys.executable, [__file__, '--child'], dead_callback)
prox = Proxy(ChildProcess(p, p))
prox.obj = obj
return prox.obj
@@ -138,9 +138,9 @@ def wrap_module(fqname, dead_callback = None):
pythonpath_sync()
global _g_debug_mode
if _g_debug_mode:
p = Process('python', [__file__, '--module', fqname, '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback)
p = Process(sys.executable, [__file__, '--module', fqname, '--logfile', os.path.join(tempfile.gettempdir(), 'saranwrap.log')], dead_callback)
else:
p = Process('python', [__file__, '--module', fqname,], dead_callback)
p = Process(sys.executable, [__file__, '--module', fqname,], dead_callback)
prox = Proxy(ChildProcess(p,p))
return prox