Hallo
Ich habe einen Skript in Python geschrieben, welches immer die letzten 10 Elemente aus der Liste ausgibt!
print listemax [-10:]
print listemin [-10:]
Ist es nun möglich das MIN und MAX der letzten 10 Elemente farblich hervorzuheben ?
Besten Dank
Gruß
Programmieren - alles kontrollieren 4.937 Themen, 20.662 Beiträge
Das Modul "WConio" habe ich installiert, und in den Script eingefügt.....dass jetzt so aussieht!
DIE FEHLERMELDUNG SIEHT SO AUS:
PythonWin 2.6.4 (r264:75706, Jan 22 2010, 16:41:54) [MSC v.1500 32 bit (Intel)] on win32.
Portions Copyright 1994-2008 Mark Hammond - see 'Help/About PythonWin' for further copyright information.
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 322, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 655, in run
exec cmd in globals, locals
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 24, in
a,b=liste()
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 7, in liste
maximum=(raw_input("Max Zahl eingeben: "))
File "C:\Python26\Lib\site-packages\pythonwin\pywin\framework\app.py", line 369, in Win32RawInput
raise KeyboardInterrupt("operation cancelled")
KeyboardInterrupt: operation cancelled
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 322, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 655, in run
exec cmd in globals, locals
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 24, in
a,b=liste()
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 19, in liste
WConio.textcolor(WConio.LIGHTGREEN)
File "C:\Python26\lib\site-packages\WConio.py", line 162, in textcolor
bgcolor = gettextinfo()[4] & 0x00F0
error: GetScreenInfo Failed
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 322, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
File "C:\Python26\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 655, in run
exec cmd in globals, locals
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 24, in
a,b=liste()
File "C:\Users\ULTIMATE\Documents\Schleifen_Test.py", line 19, in liste
WConio.textcolor(WConio.LIGHTGREEN)
File "C:\Python26\lib\site-packages\WConio.py", line 162, in textcolor
bgcolor = gettextinfo()[4] & 0x00F0
error: GetScreenInfo Failed
Wo liegt der Fehler ?
Schöne Grüsse