packages:python-poldek
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
packages:poldekpythonbindings [2008-07-29 20:00] – more adequate name grizz | packages:python-poldek [2013-04-10 14:45] (current) – Page name changed from packages:poldekpythonbindings to packages:python-poldek glen | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | /* page was renamed from Packages/ | ||
+ | |||
+ | |||
+ | ====== Poldek unofficial Python bindings ====== | ||
+ | Here's some information i managed to gather by looking at swig source and py code. A lot of help gave '' | ||
+ | |||
+ | You may also find useful [[http:// | ||
+ | |||
+ | |||
+ | |||
+ | ===== poldek_ctx ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | poldek.lib_init() | ||
+ | ctx = poldek.poldek_ctx() | ||
+ | ctx.load_config("/ | ||
+ | ctx.setup() | ||
+ | </ | ||
+ | |||
+ | * ctx.load_config(CONFIGFILE) | ||
+ | CONFIGFILE string path to config file | ||
+ | |||
+ | |||
+ | * ctx.configure(CONSTANT, | ||
+ | |||
+ | |||
+ | < | ||
+ | >>> | ||
+ | 1 | ||
+ | >>> | ||
+ | 1 | ||
+ | </ | ||
+ | |||
+ | * ctx.get_avail_packages() | ||
+ | sample | ||
+ | |||
+ | < | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== poldek_ts ===== | ||
+ | poldek_ts(ctx, | ||
+ | |||
+ | where flags can be (from poldek_ts.c:: | ||
+ | |||
+ | |||
+ | * POLDEK_TS_INSTALL | ||
+ | * POLDEK_TS_UNINSTALL | ||
+ | * POLDEK_TS_VERIFY | ||
+ | |||
+ | |||
+ | < | ||
+ | ts = poldek.poldek_ts(ctx, | ||
+ | ts = poldek.poldek_ts(ctx, | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== poclidek_ctx ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | cmd = cctx.rcmd_new(ts) | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== poclidek_rcmd ===== | ||
+ | |||
+ | |||
+ | < | ||
+ | >>> | ||
+ | 1 | ||
+ | >>> | ||
+ | >>> | ||
+ | [xmms-1.2.10-4, | ||
+ | >>> | ||
+ | |||
+ | |||
+ | </ | ||
packages/python-poldek.txt · Last modified: 2013-04-10 14:45 by glen