[wingide-users] using scripts when installing python in non-standard locations

Marcin Krol mrkafk at gmail.com
Fri Jul 12 04:34:01 EDT 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Solved it!


It appears that instructions in pep8panel.py are incorrect:

# ------------------------------ CONFIGURATION
- -----------------------------------------------------
#
# Commands and arguments. Default set for *unix based systems. For
Windows adjust as follow
#
#    PEP8_COMMAND = r"C:\Python26\python.exe"
#
# and add the pep8 script as the first argument in PEP8_ARGS
#
#    PEP_ARGS = [r"C:\Python26\Scripts\pep8-script.py", ...]


The actual arguments you have to use on Windows (8 in my case) have to
be like this:


PEP8_COMMAND = r"C:\soft\Anaconda\Scripts\pep8.exe"
PEP8_ARGS = ['--repeat', '--statistics'] # add args but don't remove
those two!


I'll file a bug rep at pep8panel project.




===
> The pep8checker is a script so you put it in the scripts directory 
> in your User Settings Directory (listed 5th in Wing's About box) 
> and then select Reload All Scripts from the Edit menu.  Then you 
> should have the PEP8 panel appear in the Tools menu.
> 
> They have to be in the same process space as Wing so don't work in 
> the Python Shell or debugger unless you have the Wing sources and 
> run the entire IDE in the debugger.
> 

Thank you for your reply!

However, putting pep8checker.py in scripts subdir is precisely what I
started with, sorry for not writing that clearly before, the workflow:


1. I copied the script to C:\soft\Wing IDE 4.1\scripts



2. installed pep8:

pip install pep8



3. checked that pep8 works:

C:\>pep8 tortoise_post_commit_hook.py
tortoise_post_commit_hook.py:26:37: E231 missing whitespace after ','
tortoise_post_commit_hook.py:26:49: E231 missing whitespace after ','
tortoise_post_commit_hook.py:32:24: W291 trailing whitespace
tortoise_post_commit_hook.py:35:1: E302 expected 2 blank lines, found 1
..



2. adjusted settings in pep8panel.py:

PEP8_COMMAND = 'C:\\soft\\Anaconda\\python.exe'
PEP8_ARGS = ['C:\\soft\\Wing IDE 4.1\\scripts\\pep8panel.py',
'--repeat', '--statistics'] # add args but don't remove those two!



3. restarted WingIDE



4. selected PEP8 Tool from Tools menu. The PEP8 tool tab in upper
right Wing window corner appears correctly, just like other tool
subwindows.




5. select file to be checked (for editing), rclick in PEP8 panel
windows, select "Update for tortoise_post_commit_hook.py".


The result is nothing: Errors (0), Warnings (0), Statistics(0).

Messages window (set to "Scripts" for "Show Messages" droplist) shows
nothing that looks like produced by pep8panel.py. It does show
"Loading script directory C:\soft\Wing IDE 4.1\scripts".



After all this rigmarole I installed PyLint and what's weird is that
it works correctly on the same file (it shows warnings and infos) but
Pep8panel still does not work.



Regards,
Marcin Krol



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJR3795AAoJEFMgHzhQQ7hO/aoH+wfXT99PFyQ57iD3K8vjvos4
X3waP5/CMSsEFKNYv6uBV05DyHKheevfP58uhow/1omgh3SlRkATH8PXSRCnSGpJ
vUr4vv8U2j9GQWqOtmVjICMl2sIuDcy5WMGGWfjzH44qKjK0FWOGGLJgJZY+bwgj
vmM2rGhJT/iHg4iCF+YNqyeHh8AGE1GRtG6AUoCxJfD92vm3QkT9YzJg98rnInc2
6wR/L43ZEtlgaVOWP9zUxMwT/B9nC5rbiA7dOpMp4XC++sNTR/lCVekSJacX3LVy
ctqSRpB/4oBHR7JMGy5W3JOE9TliqA0SOlHmI30Btkqn822+8s7i3v+pjYS5Yi0=
=HgAW
-----END PGP SIGNATURE-----


More information about the wingide-users mailing list