Ask Your Question

Using Pylint with Remote Mode

asked 2019-03-21 15:15:54 -0500

TomBerk's avatar

updated 2019-03-21 20:01:28 -0500

We primarily use Wing in remote mode where we run the IDE on our Windows laptops controlling the execution on a remote Linux host. We also like to use pylint. The problem is that we aren't able to do both (pylint on a remote host). I asked support about this several months ago, and they confirmed that the pylint integration works only for local files. This is more of an issue than it might seem because the remote host environment is very specialized and very different than the Windows laptop environment.

Support mentioned that this capability might be introduced in Wing 7. Did that make it into Wing 7? I just looked in Wing I can see there's a new Code Warnings capability that has something to do with pylint, but I haven't been able to figure out how to use it.

Any pointers would be appreciated...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-21 20:01:16 -0500

updated 2019-03-21 20:04:00 -0500

Yes, it works in Wing 7 with a bit of extra configuration. The way to enable PyLint for a remote host in the Code Warnings tool is:

1) Go to the Configuration tab in the Code Warnings tool and check on "Enable external checkers" and then click on the Configure button that appears.

2) Under the PyLint tab in the configuration dialog check on Enabled and then you will need to edit the default Command Line to replace ${WING:PYTHON} with the full path to the Python you want to run PyLint under on the remote host.

Submit the dialog and the Code Warnings tool should update to show any warnings from Wing and PyLint together in the Warnings tab, and also inline on the editor.

If this doesn't work, you can see the output of the PyLint call in the console, which you can show from the Options menu in the Command Line tool.

Please let me know you have other questions or can't get it working.

edit flag offensive delete link more


The fact that you need to replace ${WING:PYTHON} with the full path of Python on the remote host is probably a bug. It seems to resolve this env to blank in the remote case, which I think is wrong. We'll try to fix this some time after Wing 7rc1, which has already been built.

Wingware Support's avatar Wingware Support  ( 2019-03-21 20:05:30 -0500 )edit

I wasn't able to try remote mode until today because our remote image didn't have pylint installed, but we finally got it installed today. Unfortunately, Wing's Code Warnings tool is not generating any results for remote files. I do see results in the console, but it appears that the IDE may not be parsing the results for its Code Warnings.

I have the configuration setup with a command line of:

/usr/bin/python3 -m pylint --msg-template="{path}:{line}:{column}: {msg} ({symbol})"

It appears to be parsing the results for the Code Warnings tools for a local (Windows) Python file, but I can't get it to work for a remote (Linux) Python file. I'm now on . Do I have the syntax for the msg-template wrong?

The failing remote case output looks like:

>>> /usr/bin/python3 -m pylint "--msg-template={path}:{line}:{column}: {msg ...
TomBerk's avatar TomBerk  ( 2019-04-22 16:43:26 -0500 )edit

Just a note based on some emails that were exchanged: There is a bug in Wing with parsing pylint output in the remote case, when pylint writes full paths for the filename. We'll try to fix this soon.

Wingware Support's avatar Wingware Support  ( 2019-04-29 09:29:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-03-21 15:15:54 -0500

Seen: 2,809 times

Last updated: Mar 21 '19