I am trying to run this python script:
but for some reason it contains a bunch of illegal characters and gives this error:
C:\tools\inspect>python largestFiles.py
File "largestFiles.py", line 28
print "Finding objects larger than {}kB\u2026".format(args.filesExceeding)
^
SyntaxError: invalid syntax
If I remove those illegal characters I still get:
C:\tools\inspect>python largestFiles.py
File "largestFiles.py", line 28
print "Finding objects larger than {}".format(args.filesExceeding)
^
SyntaxError: invalid syntax
Any ideas?
I am running it on windows 8 using python 3.4
解决方案
As print is function in python 3 you need to put your string in parenthesis. https://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function
>>> print ("Finding objects larger than kB\u2026")
Finding objects larger than kB…