Hi: I've been searching for python bindings for alpm and I found this <http://mailman.archlinux.org/pipermail/pacman-dev/2011-April/012896.html> The problem is that I want to use it and I the functions doesn't seems to work. Also I tried pycman scrit and I got some errors. Note: I installed the pyalpm package from AUR I want to use it, but I just simply doesn't know how. I think this comment will fit too to the developers of libalpm, Ok, I can work with the C headers, but I will need a minimal example of how to interface with the lib. Something really simple, like test app, not the pacman code pls Thxs in advance. PS: The reason, I'm trying to make a pacman front-end, but as pacman is already a front-end of libalpm, then I'm trying to make other libalpm front-end. Erick -- 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
On 2011/4/26 Erick Pérez <erick.red@gmail.com> wrote:
Hi:
I've been searching for python bindings for alpm and I found this <http://mailman.archlinux.org/pipermail/pacman-dev/2011-April/012896.html>
The problem is that I want to use it and I the functions doesn't seems to work. Also I tried pycman scrit and I got some errors.
Note: I installed the pyalpm package from AUR
I want to use it, but I just simply doesn't know how. I think this comment will fit too to the developers of libalpm, Ok, I can work with the C headers, but I will need a minimal example of how to interface with the lib. Something really simple, like test app, not the pacman code pls
Thxs in advance.
PS: The reason, I'm trying to make a pacman front-end, but as pacman is already a front-end of libalpm, then I'm trying to make other libalpm front-end.
Erick
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.
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
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.
participants (2)
-
Erick Pérez
-
Rémy Oudompheng