On windows there are no hash-bangs, but you can usually look through the source code and try and find a print statement.
If its
then its Python 2 usually.
But if its
then its Python 3 usually.
The problem is that you can use a print() statement in Python 2 and it'll work, but I believe it'll throw an error if you try and do a print "hi" in Python 3. In my experience though, most programmers don't use print() in Python 2, possibly because its not very Pythonic.
If its
Code:
print "Hello World."But if its
Code:
print("Hello World.")The problem is that you can use a print() statement in Python 2 and it'll work, but I believe it'll throw an error if you try and do a print "hi" in Python 3. In my experience though, most programmers don't use print() in Python 2, possibly because its not very Pythonic.
Edited: 2013-02-16, 12:45 am
