473,385 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Work with Windows workgroups under Python?

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.
|__|_|__||_____|_____|
Jan 2 '06 #1
3 1952
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/
Jan 2 '06 #2
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

Jan 3 '06 #3
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.
Jan 3 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

383
by: John Bailo | last post by:
The war of the OSes was won a long time ago. Unix has always been, and will continue to be, the Server OS in the form of Linux. Microsoft struggled mightily to win that battle -- creating a...
1
by: Thomas Pither | last post by:
Hi, I followed Jack MacDonald's advice on setting access userlevel security. This means I created several workgroups. Two of them do not work. The developer and the editor group. Both...
1
by: Katie | last post by:
I have recieved a database on which security was supposed to be set up. What was actually set up was a workgroup. Now all databases are using this workgroup on start up and, despite the fact...
3
by: JaBo | last post by:
Our company computers were recently upgraded to Windows XP with Microsoft Office 2003. We have 3 different Access Databases (in different directories on our network) which all require the user to...
0
by: Dirk Reske | last post by:
Hello, how can I enumerate all workgroups and the computers in each of it? I listed computers using NetServerEnum til now. But now I need the workgroups also! thanks
3
by: stuart_white_ | last post by:
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3...
0
by: giddy | last post by:
Hie, i need to know how to enumerate all pcs.. connected locally to the users computer.. also i need to display this information in a treeview.. .. i need to show the workgroups and the pcs in...
6
by: Stef Mientki | last post by:
hello, I want to find all files with the extension "*.txt". From the examples in "Learning Python, Lutz and Asher" and from the website I see examples where you also may specify a wildcard...
1
by: misiek3d | last post by:
Hello I want to use IronPython as Windows Scripting Host language. Is it possible? How can I do it? I know that ActivePython works as WSH language but for specific reasons I need to use...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.