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: ================= error ================= pycman -Q flashplugin Traceback (most recent call last): File "/usr/bin/pycman", line 105, in <module> ret = main(sys.argv[1:]) File "/usr/bin/pycman", line 101, in main ret = pycman.run_action_with_args(action, data) File "/usr/lib/python3.2/site-packages/pycman/__init__.py", line 45, in run_action_with_args return callback(args) File "/usr/lib/python3.2/site-packages/pycman/action_query.py", line 175, in main config.init_with_config_and_options(args) File "/usr/lib/python3.2/site-packages/pycman/config.py", line 119, in init_with_config_and_options config = read_config(config_file) File "/usr/lib/python3.2/site-packages/pycman/config.py", line 58, in read_config parser.read_string(preprocessed.getvalue(), source=path) File "/usr/lib/python3.2/configparser.py", line 712, in read_string self.read_file(sfile, source) File "/usr/lib/python3.2/configparser.py", line 707, in read_file self._read(f, source) File "/usr/lib/python3.2/configparser.py", line 1062, in _read fpname, lineno) configparser.DuplicateOptionError: While reading from /etc/pacman.conf [line 82]: option 'server' in section 'core' already exists ================= error ================= PS: I installed pyalpm from AUR with no hacks at all -- El derecho de expresar nuestros pensamientos tiene algún significado tan sólo si somos capaces de tener pensamientos propios. El miedo a la libertad, Erich Fromm