2011/4/28 Erick Pérez <erick.red@gmail.com>:
Hello,
There is plenty of example code in pyalpm sources. Learn to use 'pydoc' to get the documentation for individual functions, read code in the tests/ subdirectory, and read pycman's source code.
I don't know what else I could do. pycman *is* the minimal example. libalpm is not an easy thing to handle at first sight.
Regards, Rémy.
Well, I do know how to use pydoc, believe me, and what I was asking was a simple sample how to load libalpm and make a simple query. Anyway at first I tried to test your pycman and It gave me back this error:
This is because pycman is a very quick hack that cannot parse pacman.conf. If you are looking for samples read the code in the tests/ and pycman/ subdirectory, as I already said. -- Rémy.