Tuesday, December 16, 2008

Python 2.6 : ez_setup and setuptools, pylint on Windows

After i installed 2.6 i notice there is no setuptools windows installer in the python.org site.
So to manually install it you need to :-

1. Download this egg file :

2. Make sure u have download ez_setup.py from

3. ez_setup setuptools-0.6c9-py2.6.egg
PJ Eby :
Actually, you can just download the source, unzip it, and do "setup.py bdist_wininst" to build your own .exe installer.

Now you need to download the pylint for checking /integrating with ur ide.
And again, u notice that u will fail to get it installed via "easy_install pylint", so here
is the manual way.

(all the download links are at the upper right hand corner)

Download and unzip to all the folders, then goto each of them, common, astng, pylint and run :
python setup.py install

Case close.

.py association in Vista/Windows Missing

I was playing  with version 2.6 Python without uninstalling version 2.5. 
And for some reason i realize that when i execute a module without specifying the python.exe, the module could not get the arguments that was passed in.
For eg.

test.py argument1 argument 2
(argument1 and argument2 is missing from the sys.argv)

python test.py argument1 argument2 : works

Initially i tried "assoc .py" followed by "ftype Python.File" and the association was CORRECT!
It shows : Python.File="C:\Python26\python.exe" "%1" %*

Later i found out it was because there is still a registry key that is mapping wrongly.
Changing that registry key solves the problem.

Refer to the picture.