Example code for using Samba python bindings

Garming Sam garming at catalyst.net.nz
Mon Aug 1 02:56:17 UTC 2016


Most of the examples of using the python bindings are just in the test 
code, but some of them aren't used much at all. 
python/samba/netcmd/gpo.py seems to be the only user of the smb loadfile 
command. So you mostly just end up reading the binding code like in 
libcli/pysmb.c (or running pydoc on some module or poking at it to see 
which methods it has).

If the objects are NDR packed, e.g. if you're messing around with RPC, 
there's the additional help of the IDL but it's quite often the case 
that you're one of the only people to using some bit of the binding, 
despite the functionality being provided (which goes to show we need 
more tests as well probably).

Cheers,

Garming

On 30/07/2016 4:03 a.m., Steve French wrote:
> Any good example code using Samba python bindings for smbclient like
> purposes (getting files, connecting to servers, issuing reads etc.)?
>
> The info I found looked older or out of date
>
> https://www.samba.org/~jelmer/samba4-python.pdf
>




More information about the samba-technical mailing list