NetBeans complains, but the code runs
Question: I am new to python. I am writing programs in NetBeans.

  * NetBeans 8.1
  * Python Plugin for NetBeans
  * Python 3.5.1
  * Plugin is set up for 3.5.1, instead of the default 2.7

NetBeans complains when I write the statement

    
    
    print ("_ ", end='')
    

The error is

    
    
    no viable alternative at input '='
    

It appears that NetBeans is checking for 2.7 syntax, instead of 3.5. I am able
to run the code, so NetBeans is using 3.5 to execute.

How do I configure NetBeans so it uses the correct syntax checking?

* * *

After the recommendation of @alecxe, I reported a bug to NetBeans.

NetBeans does not support python 3.x. The plugin runs the correct version, but
the IDE syntax checking is linked to 2.x.

> Thank you for your report. Note that we do not officially support Python 3.x
> yet. However, It is a high-importance task on our nbPython Jira board...
> Marking this bug as Duplicate. Suggest you follow
> [Bug#229940](https://netbeans.org/bugzilla/show_bug.cgi?id=229940) for
> notification.

PS. PyCharm is great.


Answer: The problem is reproducible on my end too. Even if the default Python
Environment is set to Python3.5 and the Project Interpreter is also set to
Python3.5, it still uses Python2 specific syntax checks. For example, it does
not highlight the `print` if it is used as a statement and not function:

[![enter image description
here](http://i.stack.imgur.com/jjIEXm.png)](http://i.stack.imgur.com/jjIEXm.png)

I don't think this particular behavior is configurable and **this is a bug**
(I suspect the bundled Jython is used for the "live" syntax checking). You
should definitely file an issue
[here](https://netbeans.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=STARTED&bug_status=REOPENED&list_id=648030&order=changeddate%20DESC%2Cbug_status%2Cpriority%2Cassigned_to%2Cbug_id&product=python&query_based_on=&query_format=advanced).

* * *

External tools like `PyLint` might help, but it is [not yet
integrated](https://netbeans.org/bugzilla/show_bug.cgi?id=161404).

* * *

And, just saying, PyCharm has a completely free community edition.

