enumerating processes
kyosohma at gmail.com
kyosohma at gmail.com
Tue Mar 27 09:53:23 EDT 2007
On Mar 27, 12:15 am, Shane Geiger <sgei... at ncee.net> wrote:
> I believe you are looking for os.getpid()
>
> 李现民 wrote:
> > hi ,all
> > any one knows how to enumerate the current running processes , or
> > how to obtain a specific process by its name or process id. I know I
> > can do this in many programming languages , but how in python? any
> > one know?
> > Thanks for any guidance.
>
> > --
> > li xianmin
>
> > lixian... at gmail.com <mailto:lixian... at gmail.com>
>
> --
> Shane Geiger
> IT Director
> National Council on Economic Education
> sgei... at ncee.net | 402-438-8958 | http://www.ncee.net
>
> Leading the Campaign for Economic and Financial Literacy
>
> sgeiger.vcf
> 1KDownload
You can also use Golden's WMI to grab a list. As I understand it, the
WMI module relies on the win32 modules, but it's a nice wrapper. Check
out the cookbook at:
http://tgolden.sc.sabren.com/python/wmi_cookbook.html#running_processes
Mike
More information about the Python-list
mailing list