Seite 1 von 1

python-debian

Verfasst: Freitag 25. Juni 2010, 19:27
von floyd84
Hi,

gibt es irgendwo ein tutorial zum python-debian Modul?

Die help() Funktion unter Python ist nicht wirklich ausführlich.

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 19:55
von Darii
Kein anderes als für jedes anderes Python auch: http://docs.python.org/tutorial/

Ist übrigens gleich der erste Treffer: http://lmgtfy.com/?q=python+tutorial

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 20:10
von floyd84
Ich suche kein allgemeines Tutorial!

Unter Debian( wahrscheinlich auch unter Ubuntu) gibt es ein Modul welches ich mit

Code: Alles auswählen

import debian
Importieren kann und dazu suche ich ein Tutorial.

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 20:27
von Leonidas

Code: Alles auswählen

$ cat /etc/debian_version 
squeeze/sid
$ python
Python 2.5.5 (r255:77872, Apr 21 2010, 08:40:04) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import debian
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named debian
Ich glaube du solltest uns sagen wo dein Debian-Modul herkommt.

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 20:35
von floyd84

Code: Alles auswählen

# apt-cache search python-debian
python-debianbts - Python interface to Debian's Bug Tracking System
python-debian - Zur Arbeit mit Debian-bezogenen Datenformaten benötigte Python-Module

Ich habs aber nicht extra nachinstalliert, also bei mir war es bei der Standard Installation dabei!

Vielleicht wurde es als Abhänigkeit mit Installiert was ich aber nicht glaube!

EDIT:

Code: Alles auswählen

$ cat /etc/debian_version 
squeeze/sid
$ python
Python 2.5.5 (r255:77872, Apr 21 2010, 08:44:16) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import debian
>>> 

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 20:44
von Leonidas
floyd84 hat geschrieben:

Code: Alles auswählen

# apt-cache search python-debian
python-debianbts - Python interface to Debian's Bug Tracking System
python-debian - Zur Arbeit mit Debian-bezogenen Datenformaten benötigte Python-Module

Ok, habe ich schlecht gesucht.
floyd84 hat geschrieben:Ich habs aber nicht extra nachinstalliert, also bei mir war es bei der Standard Installation dabei!

Vielleicht wurde es als Abhänigkeit mit Installiert was ich aber nicht glaube!
Glaube ich beides eher weniger, denn die Pakete die davon abhängen sind recht exotisch und die Priorität des Paketes ist "optional", also eher nicht in der Standardinstallation zu finden.

Aber davon abgesehen: Die Dokumentation dazu findest du mit help(debian) bzw. help(debian.changelog) etc.

Re: python-debian

Verfasst: Freitag 25. Juni 2010, 20:57
von floyd84
Oh alles klar,
hätte ich auch selber drauf kommen können :oops: