| 1 |
Metadata-Version: 1.1 |
| 2 |
Name: pysmbc |
| 3 |
Version: 1.0.25.1 |
| 4 |
Summary: Python bindings for libsmbclient |
| 5 |
Home-page: https://github.com/hamano/pysmbc |
| 6 |
Author: ['Tim Waugh <[email protected]>', 'Tsukasa Hamano <[email protected]>', 'Roberto Polli <[email protected]>'] |
| 7 |
Author-email: UNKNOWN |
| 8 |
License: GPLv2+ |
| 9 |
Description: This is a set of Python bindings for the libsmbclient library |
| 10 |
from the samba project. |
| 11 |
|
| 12 |
>>> # Directory listing example: |
| 13 |
>>> import smbc |
| 14 |
>>> ctx = smbc.Context (auth_fn=my_auth_callback_fn) |
| 15 |
>>> entries = ctx.opendir ("smb://SERVER").getdents () |
| 16 |
>>> for entry in entries: |
| 17 |
... print entry |
| 18 |
<smbc.Dirent object "music" (File share) at 0x7fbd7c42b3a0> |
| 19 |
<smbc.Dirent object "IPC$" (IPC share) at 0x7fbd7c42b148> |
| 20 |
<smbc.Dirent object "Charlie" (Printer share) at 0x7fbd7c42b3c8> |
| 21 |
>>> d = ctx.open ("smb://SERVER/music") |
| 22 |
|
| 23 |
>>> # Write file example: |
| 24 |
>>> import smbc |
| 25 |
>>> import os |
| 26 |
>>> ctx = smbc.Context (auth_fn=my_auth_callback_fn) |
| 27 |
>>> file = ctx.open ("smb://SERVER/music/file.txt", os.O_CREAT | os.O_WRONLY) |
| 28 |
>>> file.write ("hello") |
| 29 |
|
| 30 |
>>> # Read file example: |
| 31 |
>>> import smbc |
| 32 |
>>> ctx = smbc.Context (auth_fn=my_auth_callback_fn) |
| 33 |
>>> file = ctx.open ("smb://SERVER/music/file.txt") |
| 34 |
>>> print file.read() |
| 35 |
hello |
| 36 |
|
| 37 |
|
| 38 |
Platform: UNKNOWN |
| 39 |
Classifier: Intended Audience :: Developers |
| 40 |
Classifier: Topic :: Software Development :: Libraries :: Python Modules |
| 41 |
Classifier: License :: OSI Approved :: GNU General Public License (GPL) |
| 42 |
Classifier: Development Status :: 5 - Production/Stable |
| 43 |
Classifier: Operating System :: Unix |
| 44 |
Classifier: Programming Language :: C |