This is the Python 2 syntax, note the commas , on the raise and except lines:
Python 2.x2.3
try:
    raise IOError, "input/output error"
except IOError, exc:
    print exc
In Python 3, the , syntax is dropped and replaced by parenthesis and the as keyword:
try:
    raise IOErro...