Re: [Python-de] Curses-Ersatz für Windows
Hallo Stefan und Rest, "Stefan Schwarzer" <sschwarzer@sschwarzer.net> schrieb:
ich möchte im Terminal unter Windows gerne ein Eingabefeld und darüber scrollenden Text anzeigen. Bei meiner bisherigen Suche wurde ich noch nicht fündig. Curses für Windows bringt mein Python zum Absturz, msvcrt scheint diese funktionalität nicht zu besitzen. Die Funktionalität, dein Python zum Absturz zu bringen? ;-) Genau die :-) und die Funktionalität das Terminal so zu steuern, dass ich den Text beliebig auf dem Bildschirm platzieren kann.
Gibt es da etwas für Python, vielleicht sogar in der lib? Oder kann man irgendeine C-Lib nutzen? Hilft dir das weiter? http://freshmeat.net/projects/python-urwid
import urwid. Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Python25\lib\urwid\curses_display.py", line 28, in <module> import curses ImportError: No module named curses Urwid scheint auch auf Curses aufzusetzen, was in der Windofvariante von Python nicht dabei ist. Obiger Import wird allerdings schon bei "Hello world" benutzt, also nicht wirklich eine Alternative.
Vielleicht findest du auch noch etwas im Python Package Index, was dir weiterhilft. Ich habe hier einfach mal "Terminal" als Suchbegriff eingegeben, aber vielleicht fallen dir (viel) bessere ein: http://pypi.python.org/pypi?%3Aaction=search&term=terminal&submit=search Da gab es viele interessante Sachen, aber wirklich gefunden habe ich nichts.
Was den scrollenden Text betrifft, habe ich mich unglücklich ausgedrückt. Ich möchte ein Eingabefeld am unteren Rand des Bildschirms und oben drüber Text, wie es irsii/ircii/tinyirc z.B. machen. Da gibt es doch bestimmt etwas in C, was man von Python aus nutzen könnte? Danke Gruß Sebastian
participants (1)
-
Sebastian Humenda