Hallo *, ich möchte eine Python-Application einsetzen, welche rlcompleter verwenet. Dieser will das Module readline importiern, findet es aber nicht. Auch in der aktuellen Python Version gibt es so ein Modul 'readline' nicht?? Wo bekomme ich dieses Modul? Danke für eure Tips, Katja ---------------------------- katja-suess-imac-g5:~/zope/Redutils/commander zope$ ./commander.py Traceback (most recent call last): File "./commander.py", line 14, in ? from CommanderClass import * File "/Users/zope/zope/RedUtils/commander/CommanderClass.py", line 16, in ? from utilities import * File "/Users/zope/zope/RedUtils/commander/utilities.py", line 5, in ? from PlainCompleter import PlainCompleter File "/Users/zope/zope/RedUtils/commander/PlainCompleter.py", line 1, in ? from rlcompleter import Completer File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/rlcompleter.py", line 42, in ? import readline ----------------------------- rlcompleter.py: """Word completion for GNU readline 2.0. This requires the latest extension to the readline module. The completer completes keywords, built-ins and globals in a selectable namespace (which defaults to __main__); when completing NAME.NAME..., it evaluates (!) the expression up to the last dot and completes its attributes. It's very cool to do "import sys" type "sys.", hit the completion key (twice), and see the list of names defined by the sys module! Tip: to use the tab key as the completion key, call readline.parse_and_bind("tab: complete") Notes: - Exceptions raised by the completer function are *ignored* (and generally cause the completion to fail). This is a feature -- since readline sets the tty device in raw (or cbreak) mode, printing a traceback wouldn't work well without some complicated hoopla to save, reset and restore the tty state. - The evaluation of the NAME.NAME... form may cause arbitrary application defined code to be executed if an object with a __getattr__ hook is found. Since it is the responsibility of the application (or the user) to enable this feature, I consider this an acceptable risk. More complicated expressions (e.g. function calls or indexing operations) are *not* evaluated. - GNU readline is also used by the built-in functions input() and raw_input(), and thus these also benefit/suffer from the completer features. Clearly an interactive application can benefit by specifying its own completer function and using raw_input() for all its input. - When the original stdin is not a tty device, GNU readline is never used, and this module (and the readline module) are silently inactive. """ import readline import __builtin__ import __main__ __all__ = ["Completer"] class Completer: _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Hallo Katja,
On Thu, 30 Mar 2006 16:25:39 +0200
Katja Süss
ich möchte eine Python-Application einsetzen, welche rlcompleter verwenet. Dieser will das Module readline importiern, findet es aber nicht. Auch in der aktuellen Python Version gibt es so ein Modul 'readline' nicht?? Wo bekomme ich dieses Modul? Das Modul ist definitiv im Python 2.4.2 Tarball. Hängt nun ab, woher du dein Python hast. Denn wenn beim kompilieren libncurses-dev (Debian-Name) fehlt, wird das readline Modul nicht kompiliert. Auch kann es sein, dass deine Distribution das readline-Modul ausgelagert hat (was ich allerdings etwas weniger warscheinlich finde) und du es seperat aus einem anderen Paket installieren musst.
grüße, Marek _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Marek Kubica schrieb:
Hallo Katja,
On Thu, 30 Mar 2006 16:25:39 +0200 Katja Süss
wrote: ich möchte eine Python-Application einsetzen, welche rlcompleter verwenet. Dieser will das Module readline importiern, findet es aber nicht. Auch in der aktuellen Python Version gibt es so ein Modul 'readline' nicht?? Wo bekomme ich dieses Modul?
Das Modul ist definitiv im Python 2.4.2 Tarball. Hängt nun ab, woher du dein Python hast. Denn wenn beim kompilieren libncurses-dev (Debian-Name) fehlt, wird das readline Modul nicht kompiliert. Auch kann es sein, dass deine Distribution das readline-Modul ausgelagert hat (was ich allerdings etwas weniger warscheinlich finde) und du es seperat aus einem anderen Paket installieren musst.
grüße, Marek
_______________________________________________ python-de maillist - python-de-DESQtBGin92sTnJN9+BGXg@public.gmane.org http://python.net/mailman/listinfo/python-de
Also ich habe das Modul im cheese-shop gefunden. Offensichtlich war readline nicht mitinstalliert. Jetzt hätte ich da noch eine Anschlussfrage. Wenn ich das readline-Tarball auspacke und mit 'python setup.py' installieren möchte, dann reicht das wohl nicht. Es wird nach einem Kommando gefragt. Leider gibt's kein Readme o.ä. Was braucht es noch um readline, bzw allgemein ein zusätzliches Modul zu installieren? Danke, danke und Gruss, Katja _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Katja Suess schrieb:
Also ich habe das Modul im cheese-shop gefunden. Offensichtlich war readline nicht mitinstalliert.
Jetzt hätte ich da noch eine Anschlussfrage. Wenn ich das readline-Tarball auspacke und mit 'python setup.py' installieren möchte, dann reicht das wohl nicht. Es wird nach einem Kommando gefragt. Leider gibt's kein Readme o.ä. Was braucht es noch um readline, bzw allgemein ein zusätzliches Modul zu installieren? Danke, danke und Gruss, Katja
http://docs.python.org/inst/standard-install.html Wenn es im cheeseshop lag, unterstützt es wahrscheinlich auch setuptools und EasyInstall: http://peak.telecommunity.com/DevCenter/EasyInstall Stefan _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Stefan Behnel schrieb:
Katja Suess schrieb:
Also ich habe das Modul im cheese-shop gefunden. Offensichtlich war readline nicht mitinstalliert.
Jetzt hätte ich da noch eine Anschlussfrage. Wenn ich das readline-Tarball auspacke und mit 'python setup.py' installieren möchte, dann reicht das wohl nicht. Es wird nach einem Kommando gefragt. Leider gibt's kein Readme o.ä. Was braucht es noch um readline, bzw allgemein ein zusätzliches Modul zu installieren? Danke, danke und Gruss, Katja
http://docs.python.org/inst/standard-install.html
Wenn es im cheeseshop lag, unterstützt es wahrscheinlich auch setuptools und EasyInstall:
http://peak.telecommunity.com/DevCenter/EasyInstall
Stefan
_______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
sorry, für das ungeduldige posting. Tatsächlich liess sich auch dies in der von mir immer wieder unterschätzten Python-Doku finden. Asche auf mein Haupt... sudo python setup.py install did it. Leider(oder auch gut so?) ist setup.py nicht für so dummies wie mich gemacht und sagt nicht von sich aus welche commands wie z.B install zur Auswahl stehen. Danke vielmals, Katja _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Hallo Katja, On 2006-03-30 18:05, Katja Suess wrote:
Tatsächlich liess sich auch dies in der von mir immer wieder unterschätzten Python-Doku finden. Asche auf mein Haupt... sudo python setup.py install did it. Leider(oder auch gut so?) ist setup.py nicht für so dummies wie mich gemacht und sagt nicht von sich aus welche commands wie z.B install zur Auswahl stehen.
Mit ein bisschen Nachdruck schon ;-) python setup.py --help python setup.py --help-commands (wobei der zweite Befehl in der Ausgabe des ersten steht) Viele Grüße Stefan _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Hallo,
On Thu, 30 Mar 2006 17:42:23 +0200
Katja Suess
Also ich habe das Modul im cheese-shop gefunden. Offensichtlich war readline nicht mitinstalliert. Achso - jetzt verstehe ich's. Du hast Mac OS, das erklärt einiges.
Im Cheeseshop habe ich folgendes gefunden: http://cheeseshop.python.org/pypi/readline/2.4.2 Am einfachsten ist es für dich das Egg zu installieren (du kannst es entweder über easy_install/setuptools - ggf Google befragen oder das Egg in Zip umbenennen, dann entpacken und die Dateien readline.py und readline.so in den site-packages Ordner verschieben), alternativ kannst du es selbst kompilieren.
Jetzt hätte ich da noch eine Anschlussfrage. Wenn ich das readline-Tarball auspacke und mit 'python setup.py' installieren möchte, dann reicht das wohl nicht. Es wird nach einem Kommando gefragt. Leider gibt's kein Readme o.ä.
Sowas installiert man meist mit python setup.py install (das ist bei allen Distutils-basierenden Modulen so).
Was braucht es noch um readline, bzw allgemein ein zusätzliches Modul zu installieren? Siehe oben. Zum Kompilieren brauchst du natürlich noch einen funktionirenden Compiler, aber von dem Weg würde ich abraten.
grüße, Marek _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Katja Suess schrieb:
Also ich habe das Modul im cheese-shop gefunden. Offensichtlich war readline nicht mitinstalliert.
Jetzt hätte ich da noch eine Anschlussfrage. Wenn ich das readline-Tarball auspacke und mit 'python setup.py' installieren möchte, dann reicht das wohl nicht.
Hallo Katja! Super, dass du es gefunden hast. :-) Der Befehl könnte so lauten: python setup.py install mfg Gerold :-) -- ________________________________________________________________________ Gerold Penz - bcom - Programmierung gerold.penz@tirol.utanet.at | http://gerold.bcom.at | http://sw3.at Ehrliche, herzliche Begeisterung ist einer der wirksamsten Erfolgsfaktoren. Dale Carnegie _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Katja Süss schrieb:
Hallo *, ich möchte eine Python-Application einsetzen, welche rlcompleter verwenet. Dieser will das Module readline importiern, findet es aber nicht.
Hallo Katja! Falls dieses "katja-suess-imac-g5" darauf hinweisen soll, dass du mit einem Mac arbeitest, dann wirst du wohl Pech haben. rlcompleter und readline aus der Python-Standardbibliothek sind nur für Unix. Für Windows habe ich "readline" schon mal im Internet gefunden, aber für den Mac...? Vielleicht hilft dir dieser Link weiter: http://www.pycs.net/bbum/2004/1/21/#200401211 mfg Gerold :-) -- ________________________________________________________________________ Gerold Penz - bcom - Programmierung gerold.penz@tirol.utanet.at | http://gerold.bcom.at | http://sw3.at Ehrliche, herzliche Begeisterung ist einer der wirksamsten Erfolgsfaktoren. Dale Carnegie _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Hallo,
Falls dieses "katja-suess-imac-g5" darauf hinweisen soll, dass du mit einem Mac arbeitest, dann wirst du wohl Pech haben.
rlcompleter und readline aus der Python-Standardbibliothek sind nur für Unix. Für Windows habe ich "readline" schon mal im Internet gefunden, aber für den Mac...?
Mac _ist_ unix. Und ich habe den rlcompleter am laufen. Es kann sein das ich dazu mittels fink libreadline installiert habe - das weiss ich nicht mehr. MfG Diez _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
Gerold Penz schrieb:
Katja Süss schrieb:
Hallo *, ich möchte eine Python-Application einsetzen, welche rlcompleter verwendet. Dieser will das Module readline importiern, findet es aber nicht.
Hallo Katja!
Falls dieses "katja-suess-imac-g5" darauf hinweisen soll, dass du mit einem Mac arbeitest, dann wirst du wohl Pech haben.
rlcompleter und readline aus der Python-Standardbibliothek sind nur für Unix. Für Windows habe ich "readline" schon mal im Internet gefunden, aber für den Mac...?
Vielleicht hilft dir dieser Link weiter: http://www.pycs.net/bbum/2004/1/21/#200401211
mfg Gerold :-)
Hey, aufmerksam gelesen! *thumbs-up* http://www.python.org/pypi/readline/2.4.2 bietet readline speziell für macosx an. Grüsse, Katja _______________________________________________ python-de maillist - python-de@python.net http://python.net/mailman/listinfo/python-de
participants (7)
-
Diez B. Roggisch
-
Gerold Penz
-
Katja Suess
-
Katja Süss
-
Marek Kubica
-
Stefan Behnel
-
Stefan Schwarzer