No results from enabling Pyflakes

After installing Pyflakes in my Python distribution and enabling it in Komodo, I’m not seeing any of the issues in my files detected. To test Pyflakes, I ran this test from the command line:

pyflakes Script.py
Script.py:132: undefined name ‘changelist2’
Script.py:153: undefined name ‘Build’

I expected that Komodo would draw squiggles underneath these lines but no lines ever appear.

I’ve mostly been successful using Pylint mostly works for me (occasionally it doesn’t detect anything). At the moment I have that turned off so I can just see the Pyflakes errors if it gets any.

I tried enabling Pyflakes from Project Settings, Edit Menu=>Preferences, and Edit Menu=>Current File Preferences. None of these checkboxes are doing anything.

-G

Hi, is there anything in your log that hints at a pyflakes error? (Help > Troubleshooting > View Log File) Komodo does not use the pyflakes exe, but it loads pyflakes as a Python module. Make sure it’s in your PYTHONPATH or Komodo’s PYTHONPATH (Edit > Preferences > Environment OR Edit > Preferences > Languages > Python > Additional Python Import Directories).

I am seeing this in my log:

[2016-10-21 11:40:32,605] [WARNING] koPythonLinter: pyflakes not found

I’m not sure what I need to add to PythonPath for it to work.

I tried adding these dirs to Edit=>Preferences=>Additional Python Import Directories but it didn’t fix it:

  • python\Lib\site-packages\pyflakes
  • python\Lib\site-packages\pyflakes-1.3.0.dist-info

I tried adding “import pyflakes” to a test script and it had no problem loading it.

-G

Hi, sorry for my stupidity. I got confused with another Python syntax checking tool. Komodo does look for a pyflakes executable, so you’ll need to make sure its in your PATH or Komodo’s PATH. Sorry for the noise :frowning:

Adding “PATH=%PATH%;c:\python\scripts” to Edit=>Preferences=>Environment=>User Environment Variables appears to have fixed it. I’m a little nervous about whether this line will have the intended effect of adding a search directory to the existing PATH env var.

I’m not sure how to respond to your concern, but it will behave just as if you’ve added that directory via Windows’ environment settings dialog.