New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindings: add python3 bindings for libelektra-tools #323

Open
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@manuelm
Contributor

manuelm commented Oct 3, 2015

this is an early draft to play with the libelektra tools bindings for python3.
e.g. this works:

PYTHONPATH="." /usr/bin/python3 -c "from kdb import kdb, tools; b=tools.Backend(); b.setMountpoint(kdb.Key('/', kdb.KEY_CASCADING_NAME, kdb.KEY_END), kdb.KeySet(0)); b.addPlugin('resolver'); b.addPlugin('dump'); b.validated(); x=kdb.KeySet(); b.serialize(x); [ print(y) for y in x ]"
system/elektra/mountpoints/\/
system/elektra/mountpoints/\//config
system/elektra/mountpoints/\//config/path
system/elektra/mountpoints/\//errorplugins
system/elektra/mountpoints/\//errorplugins/#5#resolver#resolver#
system/elektra/mountpoints/\//getplugins
system/elektra/mountpoints/\//getplugins/#0#resolver
system/elektra/mountpoints/\//getplugins/#5#dump#dump#
system/elektra/mountpoints/\//mountpoint
system/elektra/mountpoints/\//setplugins
system/elektra/mountpoints/\//setplugins/#0#resolver
system/elektra/mountpoints/\//setplugins/#5#dump
system/elektra/mountpoints/\//setplugins/#7#resolver

... But I have no idea if it's correct :-)

Things to do:

  • rename python3 to python before (in another PR)
  • make tools a submodule of kdb so it's kdb.tools
    • create a directory kdb
    • rename kdb.py to kdb/__init__.py
    • move _kdb.so to kdb/_kdb.so
    • move tools.py + _tools.so to kdb/
  • do the same for python2
  • fix binding of kdb::tools::Modules::load ?
  • also bind helper + merging stuff ?
  • add tests (won't do this)

ref #147

@manuelm manuelm force-pushed the manuelm:libtools branch 2 times, most recently from 6029736 to ecceada Oct 3, 2015

@manuelm manuelm force-pushed the manuelm:libtools branch from ecceada to 5e887cd Oct 6, 2015

@manuelm

This comment has been minimized.

Contributor

manuelm commented Oct 6, 2015

rebased as well

@manuelm manuelm force-pushed the manuelm:libtools branch from 5e887cd to 59d3302 Oct 7, 2015

@markus2330 markus2330 changed the title from WIP: bindings: add python3 bindings for libelektra-tools to bindings: add python3 bindings for libelektra-tools Nov 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment