Fredrik Lundh ha scritto:
> billie wrote:
>
> >> under linux, do:
> >
> >> import os
> >> os.getpid()
> >
> > Under Windows:
> >
> > import ctypes
> > ctypes.windll.kernel32.GetCurrentProcessId()
>
> getpid() works just fine on Windows too:
>
> >>> import ctypes
> >>> ctypes.windll.kernel
SpreadTooThin wrote:
> How does one get the process id?
> Is there a method for windows and unix (mac os x etc...)
>
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442477
hth
--
http://mail.python.org/mailman/listinfo/python-list
billie wrote:
>> under linux, do:
>
>> import os
>> os.getpid()
>
> Under Windows:
>
> import ctypes
> ctypes.windll.kernel32.GetCurrentProcessId()
getpid() works just fine on Windows too:
>>> import ctypes
>>> ctypes.windll.kernel32.GetCurrentProcessId()
1916
>>> import os
>>> os.get
billie wrote:
> [EMAIL PROTECTED] ha scritto:
>
> > SpreadTooThin wrote:
> > > How does one get the process id?
> > > Is there a method for windows and unix (mac os x etc...)
> >
> > under linux, do:
> > import os
> > os.getpid()
>
> Under Windows:
> import ctypes
> ctypes.windll.kernel32.GetCu
[EMAIL PROTECTED] ha scritto:
> SpreadTooThin wrote:
> > How does one get the process id?
> > Is there a method for windows and unix (mac os x etc...)
>
> under linux, do:
> import os
> os.getpid()
Under Windows:
import ctypes
ctypes.windll.kernel32.GetCurrentProcessId()
--
http://mail.pyt
SpreadTooThin wrote:
> How does one get the process id?
> Is there a method for windows and unix (mac os x etc...)
under linux, do:
import os
os.getpid()
--
http://mail.python.org/mailman/listinfo/python-list