En Fri, 31 Jul 2009 13:33:45 -0300, BDZ <bdezo...@wisc.edu> escribió:
On Jul 30, 4:41 pm, Loïc Domaigné <loic.domai...@googlemail.com>
wrote:

> Hello. I have written a Python 3.1 script running on Windows that uses
> os.path.exists() to connect to network shares. If the various network
> shares require different user account and password combos than the
> account the script is running under the routine returns false. I need
> something like os.samba.path.exists(username,password,path). Does
> anyone have a suggestion on how I can accomplish what I need to do in
> Python?

Could the Python Samba module PySamba be interesting for you?http://sourceforge.net/projects/pysamba/

Unfortunately, although it has the calls I'd want, pysamba appears to
be *nix only. I need something that will work under Windows. Is there
a set of Python Windows functions (official or contributed) that might
do what I need? (I'm new to Python)

SAMBA is a Linux implementation of the SMB protocol, natively supported on
Windows. You may use the pywin32 package (available on sourceforge.net) to
call the WNetAddConnection2 Windows function:
http://msdn.microsoft.com/en-us/library/aa385413(VS.85).aspx

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to