Email [Python-projects] Suggestion for PyLint docs

from
Brian van den Broek <bvande at po-box dot mcgill dot ca>
subject
[Python-projects] Suggestion for PyLint docs
date
2005/01/12 01:55
Bonjour,

Merci beaucoup pour PyLint! J'ai un petit contribution pour les 
documentations. (And that's all the bad French I have for today!)

I downloaded installed PyLint 0.4.2 today (Python 2.4, Windows ME I know 
:-) ). I had some difficulty getting it running. Most of it was cleared 
up by 
<http://lists.logilab.org/pipermail/python-projects/2004-April/000087.html>. 


But not quite all. I seem to have it working now, though, and I thought 
I'd draft up a paragraph for the bundled manual or README (or at least 
for future googlers). (I downloaded the 0.5 package to check if the docs 
spoke to the issue -- they don't. But, I didn't install it, so am not 
positive the issue persists.)

Do with it the below what you like. But, be warned: I am not a hacker, 
and my version of Windows is a bit old, so my suggestion might not apply 
to Win2000 of WinXP without modification. Nor am I an experienced docs 
writer. Anyway, I suggest:

<patch>
Note for Windows users:

On Windows, once you have installed pylint, the command line usage is
pylint.bat [options] module_or_package

But this will only work if pylint.bat is either in the current 
directory, or on your system path. (setup.py install install python.bat 
to the Scripts subdirectory of your Python installation -- e.g. 
C:\Python24\Scripts.) You can do any of the following to solve this:

1) change to the appropriate directory before running pylint.bat,
2) add the Scripts directory to your path statement in your autoexec.bat 
file (this file is found in the root directory of your boot-drive), or
3) create a 'redirect' batch file in a directory actually on your 
systems path.

To effect (2), simply append the appropriate directory name to the PATH= 
statement in autoexec.bat. Be sure to use the Windows directory 
separator of ';' between entries. Then, once you have rebooted (this is 
necessary so that the new path statement will take effect when 
autoexec.bat is run), you will be able to invoke PyLint by with 
pylint.bay on the command line.

(3) is the best solution. Once done, you can call pylint at the command 
line without the .bat, just as do non-Windows users by typing
pylint [options] module_or_package To effect option (3), simply create a 
plain text file pylint.bat with the single line:

C:\PythonDirectory\Scripts\pylint.bat

(where PythonDirectory is replaced by the actual Python installation 
directory on your system -- e.g. C:\Python24\Scripts\pylint.bat).
</patch>

This might all be unnecessary if, when installing on a Windows box, the 
setup.py install also created the batch file mentioned in (3) in the 
Python install dir. (That dir is added to the Windows system path by the 
Python installation procedure.) But, I don't know if adding things to 
the Python install dir is considered bad form or not.

Additionally, it would be a good thing if the manual or readme mentioned 
the gui option.

Anyway, thanks again and best,

Brian vdB



_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects