With Python 3, print
is a function and not a statement, so you would need parentheses around the arguments, as in print("continue")
, if you were using Python 3.
The caret, however, is pointing to an earlier position than it would be with Python 3, so you must be using Python 2.x instead. In this case, the error is because you are entering this in the interactive interpreter, and it needs a little "help" to figure out what you are trying to tell it. Enter a blank line after the previous block, so that it can decipher the indentation properly, as in this:
>>> try:
... fsock = open("/bla")
... except IOError:
... print "Caught"
...
(some output shows here)
>>> print "continue"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…