I am trying to write this in PyScripter IDE:
def f(a):
    print a

and it says: Syntax Error, Invalid syntax. However if I try the same code in the Python Shell it is OK and I can see the result

I am trying to write this in PyScripter IDE:
def f(a):
    print a

and it says: Syntax Error, Invalid syntax. However if I try the same code in the Python Shell it is OK and I can see the result

Pyscripter by default uses the latest version of python available So You are probably using python 3 on pyscripter where
printis a function so instead try:And to set pyscripter to use python 2 add this to your pyscripter shortcut edit the
targetfield to look like: