Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Work with Windows workgroups under Python?

Reply
Thread Tools

Work with Windows workgroups under Python?

 
 
Karlo Lozovina
Guest
Posts: n/a
 
      01-02-2006
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.
|__|_|__||_____|_____|
 
Reply With Quote
 
 
 
 
Jarek Zgoda
Guest
Posts: n/a
 
      01-02-2006
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/
 
Reply With Quote
 
 
 
 
Mondal
Guest
Posts: n/a
 
      01-03-2006
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

 
Reply With Quote
 
Heiko Wundram
Guest
Posts: n/a
 
      01-03-2006
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Who here still uses Windows for Workgroups 3.11? Ernie Werbel Computer Information 7 08-03-2006 05:49 PM
Missing workgroups =?Utf-8?B?VmlyZ2lsaWp1cw==?= Wireless Networking 3 01-18-2006 01:03 AM
Impersonation between different workgroups is failing =?Utf-8?B?bC10b3VjaGVk?= ASP .Net 0 06-01-2004 06:06 PM
Impersonation between different workgroups is failed =?Utf-8?B?bC10b3VjaGVk?= ASP .Net 0 06-01-2004 12:41 AM
multiple workgroups with win98 AlanG Computer Support 4 09-14-2003 03:08 PM



Advertisments