Re: Newbie question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • |e0

    Re: Newbie question

    So, i can't use wmi module on linux?

    On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris <pyth0nc0d3r@gm ail.comwrote:
    I think the win32 module is only for windows.
    >
  • A.T.Hofkamp

    #2
    Re: Newbie question

    On 2008-07-09, |e0 <p0q0b0d@gmail. comwrote:
    So, i can't use wmi module on linux?
    >
    On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris <pyth0nc0d3r@gm ail.comwrote:
    >I think the win32 module is only for windows.
    >>
    Welcome to the world outside MS.

    Many python modules don't actually do anything than passing on calls to an
    existing underlying library. They are cheap to make, and make it possible to
    use the functionality of the library from a Python program. The down-side is,
    as you have discovered, that you need the underlying library to make it work.

    So, the answer is no, you cannot use wmi under a non-MS OS. (But what did you
    expect, given that wmi means WINDOWS Management Instrumentation ?) No doubt
    there are also open source variants of this package, however, I am not familiar
    with them, so I cannot help you.


    Albert

    Comment

    • Tim Golden

      #3
      Re: Newbie question

      A.T.Hofkamp wrote:
      On 2008-07-09, |e0 <p0q0b0d@gmail. comwrote:
      >So, i can't use wmi module on linux?
      >>
      >On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris <pyth0nc0d3r@gm ail.comwrote:
      >>I think the win32 module is only for windows.
      >>>
      >
      Welcome to the world outside MS.
      >
      Many python modules don't actually do anything than passing on calls to an
      existing underlying library. They are cheap to make, and make it possible to
      use the functionality of the library from a Python program. The down-side is,
      as you have discovered, that you need the underlying library to make it work.
      And this is of course true both ways. Python users under Windows miss out
      on about half[*] of the os module since it's just handing off to the *nix system
      calls. At the same time, *nix users won't be able to add Shell Namespace
      Extensions or use the Windows API to monitor directory changes.
      So, the answer is no, you cannot use wmi under a non-MS OS. (But what did you
      expect, given that wmi means WINDOWS Management Instrumentation ?)
      I don't know if anyone's tried to get something like WMI running under
      Wine. In principal it might work but I suspect it would involve a lot of
      time and effort. Strictly, WMI is an implementation of the WBEM [2]
      standards. Googling around suggests that implementations exist
      for Linux but I've no idea how mature or robust they are, and I'm
      quite sure they're not going to be using a Windows API model for
      their interface.

      TJG

      [1] A pardonable exaggeration
      [2] http://www.dmtf.org/standards/wbem/

      Comment

      • |e0

        #4
        Re: Newbie question

        I did not mean to use WMI on linux, but query win machines *from* linux.
        Thank you for your clarifications

        - Leonardo

        On Wed, Jul 9, 2008 at 11:04 AM, A.T.Hofkamp <hat@se-162.se.wtb.tue. nlwrote:
        Welcome to the world outside MS.
        >
        Many python modules don't actually do anything than passing on calls to an
        existing underlying library. They are cheap to make, and make it possible to
        use the functionality of the library from a Python program. The down-side is,
        as you have discovered, that you need the underlying library to make it work.
        >
        So, the answer is no, you cannot use wmi under a non-MS OS. (But what did you
        expect, given that wmi means WINDOWS Management Instrumentation ?) No doubt
        there are also open source variants of this package, however, I am not familiar
        with them, so I cannot help you.
        >
        >
        Albert

        Comment

        • Tim Golden

          #5
          Re: Newbie question

          |e0 wrote:
          I did not mean to use WMI on linux, but query win machines *from* linux.
          Thank you for your clarifications
          In principle you ought to be able to use some kind of DCOM bridge
          (since WMI access if via COM/DCOM). I've no idea if anyone's attempted
          this or even if all the pieces are in place.

          If this won't fly, it should be simple enough to use one of the many,
          many RPC-ish mechanisms, whether all-Python or otherwise, to
          call into a WMI proxy service you could run on the chosen Windows
          boxes.

          TJG

          Comment

          • Diez B. Roggisch

            #6
            Re: Newbie question

            |e0 wrote:
            I did not mean to use WMI on linux, but query win machines *from* linux.
            What do you mean by "query"? Using the WMI module? No. It's Windows only.

            Diez

            Comment

            • Mike Driscoll

              #7
              Re: Newbie question

              On Jul 9, 2:19 am, |e0 <p0q0...@gmail. comwrote:
              So, i can't use wmi module on linux?
              >
              On Wed, Jul 9, 2008 at 9:14 AM, Lamonte Harris <pyth0nc0...@gm ail.comwrote:
              I think the win32 module is only for windows.
              WMI is a Windows thing. It stands for "Windows Management
              Instrumentation ". So it's not going to work on anything other than a
              Windows box.

              Mike

              Comment

              Working...