fork(1) download
  1. # Some comments.
  2. import sys
  3. import traceback
  4.  
  5. lineno = None
  6. other_text = [ 'Neat!', 'Awesome!' ]
  7.  
  8. while True:
  9. print 'Down we go...'
  10. try:
  11. print 'Hello World, from line %d!' % lineno
  12. print other_text[lineno % 2]
  13. break
  14. except:
  15. lineno = traceback.tb_lineno(sys.exc_info()[2])
  16. print "Gotta catch 'em all."
  17. continue
  18.  
Success #stdin #stdout 0.01s 7852KB
stdin
Standard input is empty
stdout
Down we go...
Gotta catch 'em all.
Down we go...
Hello World, from line 11!
Awesome!