Posts Tagged ‘update’

update all pip packages

You want to update all the pip-installed Python packages on your system.

At there is a very nice little script for this task:

import pip
from subprocess import call

for dist in pip.get_installed_distributions():
    call("pip install --upgrade " + dist.project_name, shell=True)

I modified it a bit to update packages in ascending order by name in an ignore-case way:

#!/usr/bin/env python

import os
import pip

dists = []
for dist in pip.get_installed_distributions():

for dist_name in sorted(dists, key=lambda s: s.lower()):
    cmd = "sudo pip install {0} -U".format(dist_name)
    print '#', cmd

I want to update the packages globally, that’s why the “sudo“. If you run it, it will just print the commands to the stdout (dry run). If everything is OK, uncomment the last line.

Update (20140121)
I made a github project of it:

Categories: python Tags: , ,

GUI for the output of PyLint

April 7, 2011 Leave a comment


I discovered PyLint yesterday and after some tests I find it very useful. However, one thing bothered me in the workflow. PyLint tells you where (in which lines) you should improve your code but if you add/remove some lines in the source, these line numbers become invalid. Thus, you need to relaunch pylint lots of times until you resolve all the problems.


Idea: make a simple GUI that shows the output of PyLint. If necessary, refresh the content of this window.


Visit Source code is here.

Usage: <>

You can refresh the content by pressing ‘r’, ‘u’, or F5.

Update (20110408)
This morning I was notified that PyLint has a simple GUI that is shipped with it; it’s called pylint-gui :)) Great! Why is it nowhere mentioned on the project’s home page? I’ve read several reviews too, nobody says it has a GUI… Now I searched for the string “gui” in the manual and yes, they mention it in two lines, but no screenshot! Either you read it word by word or you miss it. To fill the gap, here is my screenshot of the mysterious pylint-gui:

Well, if you prefer minimal design, you can try Pylov :) Otherwise use the official GUI.

Update (20110426)
I made Pylov because the PyLint plugin of the Eric IDE didn’t have the refresh option. I contacted the author of Eric and he added this feature :) So if you use Eric, it is recommended to use the PyLint plugin.

[ @reddit ]

Categories: python Tags: , , , , ,