User Tools

Site Tools


packages:python-poldek

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
packages:python-poldek [2006-06-07 01:49]
glen
packages:python-poldek [2007-03-04 20:24]
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. 
  
 +You may also find useful [[http://​cvs.pld-linux.org/​cgi-bin/​cvsweb.cgi/​poldek/​poldek/​python/​test.py|poldek/​python/​test.py]] from poldek cvs 
  
- 
-<​file>​$ python 
-Python 2.4.3 (#1, May 15 2006, 19:23:25) 
-[GCC 3.3.6 (PLD Linux)] on linux2 
-Type "​help",​ "​copyright",​ "​credits"​ or "​license"​ for more information. 
->>>​ import poldek 
->>>​ poldek.lib_init() 
->>>​ ctx = poldek.poldek_ctx() 
->>>​ ctx.load_config("/​etc/​poldek/​poldek.conf"​) 
->>>​ ctx.setup() 
-1 
->>>​ allpkg = ctx.get_avail_packages() 
-</​file>​ 
  
  
 ===== poldek_ctx ===== ===== poldek_ctx =====
 +
 +
 +<​file>​import poldek
 +poldek.lib_init()
 +ctx = poldek.poldek_ctx()
 +ctx.load_config("/​etc/​poldek/​poldek.conf"​)
 +ctx.setup()
 +</​file>​
  
   * ctx.load_config(CONFIGFILE) ​   * ctx.load_config(CONFIGFILE) ​
Line 34: Line 30:
 >>>​ ctx.configure(poldekmod.POLDEK_CONF_CACHEDIR,​ "/​tmp/​cache"​) >>>​ ctx.configure(poldekmod.POLDEK_CONF_CACHEDIR,​ "/​tmp/​cache"​)
 1 1
 +</​file>​
 +
 +  * ctx.get_avail_packages() ​
 +sample ​
 +
 +<​file>​print ctx.get_avail_packages()
 </​file>​ </​file>​
  
Line 48: Line 50:
  
  
-<file>>>​> ts = poldek.poldek_ts(ctx,​ 0) +<​file>​ts = poldek.poldek_ts(ctx,​ 0) 
->>> ​ts = poldek.poldek_ts(ctx,​ poldekmod.POLDEK_TS_INSTALL)+ts = poldek.poldek_ts(ctx,​ poldekmod.POLDEK_TS_INSTALL
 +ts = poldek.poldek_ts(ctx,​ poldekmod.POLDEK_OP_GREEDY)
 </​file>​ </​file>​
  
Line 56: Line 59:
  
  
-<file>>>​> cctx = poldek.poclidek_ctx(ctx) +<​file>​cctx = poldek.poclidek_ctx(ctx) 
->>> ​cmd = cctx.rcmd_new(ts) +cmd = cctx.rcmd_new(ts)
 </​file>​ </​file>​
  
packages/python-poldek.txt · Last modified: 2013-04-10 14:45 by glen