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

Re: python-apt problem



On Tue, Mar 22, 2005 at 12:22:01AM +0100, Alex Polite wrote:
> I'm trying to get pyhon-apt to read an alternative configuration.
[..]
> Now here's a python script that tries to list the same packages 
> 
> #!/usr/bin/python
> import apt_pkg,os,sys,time
> 
> Cnf = apt_pkg.newConfiguration()


Could you please try:
- apt_pkg.ReadConfigFile(Cnf,"/tmp/myapt.conf")
- apt_pkg.init()
+ apt_pkg.InitSystem()
+ apt_pkg.ReadConfigFile(apt_pkg.Config, "/tmp/myapt.conf")

apt_pkg.init() calls the normal pkgInitConfig() and that will read all
of the configuration.

Hope it helps,
 Michael

-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo



Reply to: