sys.exit()
DogWalker
forestiero at qwest.net
Thu Oct 9 23:40:19 EDT 2003
BDFL has said: http://www.artima.com/weblogs/viewpost.jsp?thread=4829
"Ivan Voras" <ivoras at fer.hr> wrote in message
news:bm3msp$fjo$1 at bagan.srce.hr...
In a code such as:
if len(sys.argv) < 2:
print "I need arguments!"
sys.exit(1)
Is sys.exit() really a good choice? Is there something more elegant? (I
tried return but it is valid only in a function)
--
--
Every sufficiently advanced magic is indistinguishable from technology
- Arthur C Anticlarke
More information about the Python-list
mailing list