skip to navigation
skip to content

Not Logged In

PySmbClient 0.1.3

A convenient smbclient wrapper

Python smbclient wrapper.

This is a wrapper that works by running the "smbclient" subprocess and providing an API similar to the one provided by python os module.

It is an ugly hack, but it is here for anyone that finds it useful.

The programmer before me was using a "bash" file with lots of smbclient calls, so I think my solution is at least better.

Usage example:

>>> smb = smbclient.SambaClient(server="MYSERVER", share="MYSHARE",
                                username='foo', password='bar', domain='baz')
>>> print smb.listdir("/")
[u'file1.txt', u'file2.txt']
>>> f = smb.open('/file1.txt')
>>> data = f.read()
>>> f.close()
>>> smb.rename(u'/file1.txt', u'/file1.old')
 
File Type Py Version Uploaded on Size
PySmbClient-0.1.3.tar.gz (md5) Source 2011-02-16 5KB
  • Downloads (All Versions):
  • 20 downloads in the last day
  • 75 downloads in the last week
  • 400 downloads in the last month