First time here? Check out the FAQ!

Revision history  [back]

Making Code Warnings aware of print_function

If I use the following at the top of a Python source file, to replace the print statement with a print function:

from __future__ import print_function

subsequent lines such as:

print("hello world", end = '')

execute correctly, but are highlighted with SyntaxError by the IDE. It appears the IDE is expecting a print statement. How do I make it aware of the __future__ import? (Wing Pro 7.2.0.1, Python 2.7.12)

Thanks

Making Code Warnings aware of print_function

If I use the following at the top of a Python source file, to replace the print statement with a print function:

from __future__ import print_function

subsequent lines such as:

print("hello world", end = '')

execute correctly, but are highlighted with SyntaxError by the IDE. It appears the IDE is expecting a print statement. How do I make it aware of the __future__ import? (Wing Pro 7.2.0.1, Python 2.7.12)

Thanks