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 Both sides next revision
packages:python-poldek [2006-06-07 01:49]
glen
packages:python-poldek [2006-06-07 08:29]
glen make sections copy-pasteable
Line 6: Line 6:
  
  
-<​file>​$ python +===== poldek_ctx =====
-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() +
-+
->>>​ allpkg ​ctx.get_avail_packages() +
-</​file>​+
  
  
-===== 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 28:
 >>>​ 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 48:
  
  
-<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 57:
  
  
-<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