[python-win32] terminateprocess, getprocessid and compiling trunk on win32

Mark Hammond mhammond at skippinet.com.au
Wed May 16 03:15:42 CEST 2007


These appear to be a reposts of the message you sent on May 11, which I also
answered on that same day (notwithstanding time zones!)

Mark

> -----Original Message-----
> From: python-win32-bounces at python.org
> [mailto:python-win32-bounces at python.org]On Behalf Of Benjamin Deboute
> Sent: Thursday, 10 May 2007 5:56 PM
> To: python-win32 at python.org
> Subject: [python-win32] terminateprocess,getprocessid and compiling
> trunk on win32
>
>
> Hi Pythonistas,
>
> i'm currently building a multi-platform renderfarm application, and
> would need to use GetProcessId to circumvant problems i
> encounter when i
> try to kill processes on win32
>
> IE: i can't kill with TerminateProcess a process i spawned with
> CreateProcess (getting a Acess Denied error), but i can kill it using
> this chunk of aspn'd code
>
> PROCESS_TERMINATE = 1
> handle = win32api.OpenProcess(PROCESS_TERMINATE, False, pid)
> win32api.TerminateProcess(handle, -1)
> win32api.CloseHandle(handle)
>
> As i haven't found any way to get the pid except searching for the
> process name (but as we'll get several instances of maya.exe
> running on
> a renderslave, it won't get me far), i browsed the cvs source
> and found
> a function that was recently added: GetProcessId
>
> I then tried to compile the cvs trunk using python setup.py
> build, but
> got this error
>
> Building pywin32 2.4.210.1
> running build
> running build_py
> running build_ext
> Warning - can't find an installed platform SDK
> error: The .NET Framework SDK needs to be installed before building
> extensions for Python.
>
> After several .net installs, i still got this error : \
> i also tried (and failed) compiling it on visual studio,
> cygwin+mingw,
> but as i'm quite the noob on the subject of compiling for
> windows, i'm
> afraid i'm quite lost at the moment (my skills are limited to loading
> the project, clicking on build and watching the build fail with
> wide-eyed horror)
> Has someone got any pointers on compiling the cvs trunk ? A link to a
> quick howto or just a small paste of working compiling
> commands would be
> very appreciated
>
> Alternatively, if anyone knew how to effectively kill a
> process without
> the 'access denied' error (excepting running the service as
> administrator), i'll be very happy with it
>
>
> have a nice day and thanks in advance,
> ben
>
> _______________________________________________
> Python-win32 mailing list
> Python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
>



More information about the Python-win32 mailing list