I have to turn in an assignment, and I'm extremely concerned that, since the single TA has many projects to run, it will be called using python
, which will call python 2.7, when the program is written for python3.2
and should be called that way. This would result in a syntax error, and I would loose points. I know when working on side projects, this happens a lot, and if the TA encountered this I don't think he would follow up.
I'm going to submit a readme
, but I was wondering if there was a way to catch this in my code without a lot of fuss, and print a statement that said to rerun the project as python3.2 project.py
. I could to a try: print "Rerun project…" except:pass
, but is there a better way?
python
– Permanence