# -*- coding: utf-8 -*- """ sys.exit([arg]) [pl] Stop executing script and return arg. some systems rquire int as arg, and 0 is treated as successfully ended or error otherwise. Eg. in Unix 2 means "syntax error" [en] Przerwij wykonywanie skryptu i zwraca arg. Niektóre systemy wymagaja zwrotu typu int, a 0 jest traktowane jako pomyślne zakończenie pracy a inne wartości jako błąd. Przykładowo w systemach Unix 2 oznacza "błąd składni" """ import sys ok = True if ok: sys.exit(0) else: sys.exit("Error") """ or use SystemExit Exception """ ok = True if ok: raise SystemExit, 0 else: raise SystemExit, "Error"