Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3976556
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T04:49:07+00:00 2026-05-20T04:49:07+00:00

I’m fairly new to python. (Python 2.6) I’m trying to list the running processes

  • 0

I’m fairly new to python. (Python 2.6)

I’m trying to list the running processes by importing the wmi module.

import wmi
sys.path.append(r'C:\Python26\Lib\site-packages\isapi\test\build\bdis.win32\winexe\temp')
c = wmi.WMI () 
for process in c.Win32_Process ():
    print process.ProcessId, process.Name

A system search pointed to win32api being found at the location in the append statement in the code above. But I still get the error: ImportError: No module named win32api

The actual error:

Traceback (most recent call last):
  File "C:\Documents and Settings\xxxx\Desktop\Python\Practice Code\file.py", line 1, in <module>
    import wmi
  File "C:\Python26\lib\site-packages\wmi.py", line 88, in <module>
    from win32com.client import GetObject, Dispatch
  File "C:\Python26\lib\site-packages\win32com\__init__.py", line 5, in <module>
    import win32api, sys, os
ImportError: No module named win32api

I’ve installed win32extensions making sure the versions and platform match. I’m using 2.6
I’ve also installed wmi-1.4.6

My path:

C:\Documents and Settings\xxxx\Desktop\Python\Practice Code
C:\Python26\Lib\idlelib
C:\WINDOWS\system32\python26.zip
C:\Python26\DLLs
C:\Python26\lib
C:\Python26\lib\plat-win
C:\Python26\lib\lib-tk
C:\Python26
C:\Python26\lib\site-packages

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T04:49:08+00:00Added an answer on May 20, 2026 at 4:49 am

    This should have all the information you need:

    http://mail.python.org/pipermail/python-win32/2003-December/001482.html

    No need to for WMI, just use Win32 Extensions.

    from win32com.client import GetObject
    WMI = GetObject('winmgmts:')
    
    #List all processes
    processes = WMI.InstancesOf('Win32_Process')
    for process in processes:
        print process.Properties_('Name')
    
    #Get a specific process
    p = WMI.ExecQuery('select * from Win32_Process where Name="chrome.exe"')
    #view all possible properties
    for prop in p[0].Properties_:
        print prop
    #print out PID
    print p[0].Properties_('ProcessId').Value
    

    Peter

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I am trying to loop through a bunch of documents I have to put
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.