Python Exception Syntax Handling
<p>I have a syntax error and I do not know what it is for. Is it an indent.</p>

<pre><code>import numpy as np

def main():
    try:
        Date, Open, High, Low, Last, Change, Settle, Volume, OpenInterest = np.loadtxt('C:\Users\RPH\Desktop\copper.csv',
        delimiter =',', unpack = True , dtype='str')    
    except Exception,  e: 
        print str(e)
</code></pre>

<p>I'm not entirely sure as to the problem in this code but I know in python 3.5.1 you use:</p>

<pre><code>except Exception as e:
</code></pre>

<p>and not</p>

<pre><code>except Exception, e:
</code></pre>

python exception text export-to-csv