This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
packages:python-poldek [2006-06-07 01:26] glen |
packages:python-poldek [2006-06-07 01:42] glen |
||
---|---|---|---|
Line 4: | Line 4: | ||
Here's some information i managed to gather by looking at swig source and py code. A lot of help gave ''cli/test_cli.c'', had no clue where to start from. | Here's some information i managed to gather by looking at swig source and py code. A lot of help gave ''cli/test_cli.c'', had no clue where to start from. | ||
- | Very first success: | + | |
<file>$ python | <file>$ python | ||
Line 18: | Line 18: | ||
error: foo: No such file or directory | error: foo: No such file or directory | ||
0 | 0 | ||
- | >>> | + | >>> ctx.setup() |
+ | 1 | ||
+ | >>> allpkg = ctx.get_avail_packages() | ||
</file> | </file> | ||
Line 36: | Line 39: | ||
>>> ctx.configure(poldekmod.POLDEK_CONF_CACHEDIR, "/tmp/cache") | >>> ctx.configure(poldekmod.POLDEK_CONF_CACHEDIR, "/tmp/cache") | ||
1 | 1 | ||
+ | </file> | ||
+ | |||
+ | |||
+ | ===== poldek_ts ===== | ||
+ | poldek_ts(ctx, FLAGS) | ||
+ | |||
+ | where flags can be (from poldek_ts.c::poldek_ts_setf): | ||
+ | |||
+ | |||
+ | * POLDEK_TS_INSTALL | ||
+ | * POLDEK_TS_UNINSTALL | ||
+ | * POLDEK_TS_VERIFY | ||
+ | |||
+ | |||
+ | <file>>>> ts = poldek.poldek_ts(ctx, 0) | ||
+ | >>> ts = poldek.poldek_ts(ctx, poldekmod.POLDEK_TS_INSTALL) | ||
</file> | </file> | ||
Line 43: | Line 62: | ||
<file>>>> cctx = poldek.poclidek_ctx(ctx) | <file>>>> cctx = poldek.poclidek_ctx(ctx) | ||
+ | >>> cmd = cctx.rcmd_new(ts) | ||
</file> | </file> | ||