Python: Difference between revisions

From SambaWiki
(add some details about the Python support)
 
No edit summary
Line 3: Line 3:
Using the system-provided Python should also be possible in the future, but will require the following changes when doing so:
Using the system-provided Python should also be possible in the future, but will require the following changes when doing so:


* We need to set sys.path somehow so python can find our modules when running inside of the source tree
* We need to set sys.path somehow so python can find our modules when running inside of the source tree
* We need to build .so version of the Samba Python modules
* We need to build .so version of the Samba Python modules


The latter requires some changes to the build system, so it may be useful to wait until we've switched to an alternative build system.
The latter requires some changes to the build system, so it may be useful to wait until we've switched to an alternative build system.
Line 10: Line 10:
= Available modules =
= Available modules =


* ldb
* ldb
* tdb
* tdb
* registry
* registry
* param (loadparm)
* param (loadparm)
* credentials
* credentials
* ...
* ...

Revision as of 01:07, 12 February 2008

We're currently using our own Python binary (``smbpython``) which is linked against the Python libraries and includes built-in bindings for several Samba libraries. It also sets up the path Python uses to find Python modules automatically when you are running it from inside of the Samba source directory.

Using the system-provided Python should also be possible in the future, but will require the following changes when doing so:

  • We need to set sys.path somehow so python can find our modules when running inside of the source tree
  • We need to build .so version of the Samba Python modules

The latter requires some changes to the build system, so it may be useful to wait until we've switched to an alternative build system.

Available modules

  • ldb
  • tdb
  • registry
  • param (loadparm)
  • credentials
  • ...