os.path.exists() and Samba shares

Ben Finney ben+python at benfinney.id.au
Fri Jul 31 23:02:03 EDT 2009


BDZ <bdezonia at wisc.edu> writes:

> Unfortunately, although it has the calls I'd want, pysamba appears to
> be *nix only.

That's because Samba is *nix-only. If you want to use something knowing
that it's Samba, you are by definition working on *nix.

> I need something that will work under Windows.

In that case, forget the term “samba”. What you want is the ability to
connect, *over a network*, to shares served via the SMB protocol suite.

Those shares might be implemented via Samba, MS Windows, or aything else
that can speak the SMB protocol suite. Your program, running on Windows,
should not need to care about Samba, only about the various SMB
protocols.

A search for “site:pypi.python.org smb client” gets me directly to
<URL:http://pypi.python.org/pypi/PySmbClient/>. That's totally useless
to you though, unfortunately, since it depends on Samba installed —
which you can't, by definition, on MS Windows.

> Is there a set of Python Windows functions (official or contributed)
> that might do what I need? (I'm new to Python)

Not that I know of. It would probably involve a Python wrapper around
the native MS Windows networking API, something which I'm not sure has
been done.

-- 
 \       “Whenever you read a good book, it's like the author is right |
  `\   there, in the room talking to you, which is why I don't like to |
_o__)                                   read good books.” —Jack Handey |
Ben Finney



More information about the Python-list mailing list