Work with Windows workgroups under Python?

Discussion in 'Python' started by Karlo Lozovina, Jan 2, 2006.

  1. I'm running Python 2.4 under WinXP Pro, and I would like to do some basis
    operations on my LAN - get list of workgroups, list the computers in each
    workgroup and possibly connect to specific computer and get
    share/directory list? Is there some Pythonic way of doing this? Or any
    other less Pythonic way?

    Thanks...

    --
    _______ Karlo Lozovina - Mosor
    | | |.-----.-----. web: http://www.mosor.net || ICQ#: 10667163
    | || _ | _ | Parce mihi domine quia Dalmata sum.
    |__|_|__||_____|_____|
    Karlo Lozovina, Jan 2, 2006
    #1
    1. Advertising

  2. Karlo Lozovina

    Jarek Zgoda Guest

    Karlo Lozovina napisa³(a):

    > I'm running Python 2.4 under WinXP Pro, and I would like to do some basis
    > operations on my LAN - get list of workgroups, list the computers in each
    > workgroup and possibly connect to specific computer and get
    > share/directory list? Is there some Pythonic way of doing this? Or any
    > other less Pythonic way?


    You can get these things from ActiveDirectory. Google for that, there is
    even wrapper module for querying AD server.

    --
    Jarek Zgoda
    http://jpa.berlios.de/
    Jarek Zgoda, Jan 2, 2006
    #2
    1. Advertising

  3. Karlo Lozovina

    Mondal Guest

    Hi,

    Active Directory is available under NTFS only. If you are running on
    the older FAT32, use the win32wnet and win32netcon modules in *Active
    Python 2.4*.

    You can use the WNetOpenEnum and WNetEnumResource functions in
    nested-for-loops to walk through the Network root to the lowest level
    of shareable folders, passing through workgroups and hosts.

    Regards
    Mondal, Jan 3, 2006
    #3
  4. Karlo Lozovina wrote:
    > Is there some Pythonic way of doing this?


    If you need to query for workgroups from pure Python (because you're running
    under Linux, for example), search the web for the source package of PySMB.
    That's a pure Python implementation of (parts of) the SMB protocol. It has
    been abandoned by it's author, as it seems, but IIRC the last version I
    used worked like a charm for exactly what you're trying to do with it.

    --- Heiko.
    Heiko Wundram, Jan 3, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?bC10b3VjaGVk?=

    Impersonation between different workgroups is failed

    =?Utf-8?B?bC10b3VjaGVk?=, Jun 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    714
    =?Utf-8?B?bC10b3VjaGVk?=
    Jun 1, 2004
  2. =?Utf-8?B?bC10b3VjaGVk?=

    Impersonation between different workgroups is failing

    =?Utf-8?B?bC10b3VjaGVk?=, Jun 1, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    334
    =?Utf-8?B?bC10b3VjaGVk?=
    Jun 1, 2004
  3. hshdude
    Replies:
    12
    Views:
    1,050
    Dimitri Maziuk
    Nov 4, 2004
  4. Bo Peng
    Replies:
    1
    Views:
    465
    Bo Peng
    Jan 9, 2006
  5. Stefan Ram
    Replies:
    5
    Views:
    150
    Stefan Ram
    Mar 17, 2014
Loading...

Share This Page