Fix bug in Process.name + create_process show_windows=True by default

This commit is contained in:
Clement Rouault
2016-07-29 17:32:14 +02:00
parent fe4d41db47
commit 2767a08624
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ def create_console():
sys.stderr = console_stderr
def create_process(path, args=None, dwCreationFlags=0, show_windows=False):
def create_process(path, args=None, dwCreationFlags=0, show_windows=True):
"""A convenient wrapper arround :func:`windows.winproxy.CreateProcessA`"""
proc_info = PROCESS_INFORMATION()
lpStartupInfo = None
+1 -1
View File
@@ -802,7 +802,7 @@ class WinProcess(Process):
buffer = ctypes.c_buffer(0x1024)
rsize = winproxy.GetProcessImageFileNameA(self.handle, buffer)
# GetProcessImageFileNameA returns the fullpath
return buffer[:49].decode().split("\\")[-1]
return buffer[:rsize].decode().split("\\")[-1]
@utils.fixedpropety
def pid(self):