-2

I am trying to run this python script:

https://gist.githubusercontent.com/nk9/b150542ef72abc7974cb/raw/4a1e249976c6c330116fc068fb7001e3443c5b8d/largestFiles.py

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

2
  • use {0}, instead of {} Commented Apr 14, 2015 at 13:03
  • 3
    Please don't change the question after you've received answers. If you have a new question, ask it (or, better yet, and as you failed to do before asking this question, do some research first). Commented Apr 14, 2015 at 13:05

1 Answer 1

0

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…
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.