jetzt hab ich es mal mit sys.exit() versucht:
Code: Alles auswählen
from sys import exit
class Ende(exit):
def __init__(self, exit):
exit(0)
e = Ende(exit)
e.__init__(exit)
Code: Alles auswählen
Traceback (most recent call last):
File "C:\Server\python\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript
exec codeObject in __main__.__dict__
File "D:\Dokumente und Einstellungen\Florian Löber\Desktop\exit.py", line 8, in ?
class ende(exit):
TypeError: cannot create 'builtin_function_or_method' instances