[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Parsing a status file



Hi,

I'm having a bit of a fiddle with python_apt, to see if it will do what I
need for Demi[1]

I'd like to parse up a status file (not /var/lib/dpkg/status).

Is there a way to initialise apt_pkg with the contents of a file which
happens to be in the format of /var/lib/dpkg/status, but isn't
/var/lib/dpkg/status?

I'd also like to parse up a Packages file in a similiar manner. Again, I'm
not interested in the local APT cache/config on the box running the Python
script, I'm dragging back a Packages file from a mirror and the status file
from a number of boxes elsewhere.

I want to do grep-dctrl type stuff, but within Python.

regards

Andrew

[1] http://demi.alioth.debian.org/

-- 
linux.conf.au 2005   -  http://linux.conf.au/  -  Birthplace of Tux
April 18th to 23rd   -  http://linux.conf.au/  -       LINUX
Canberra, Australia  -  http://linux.conf.au/  -    Get bitten!



Reply to: