Taming pythons


motey@motey-desktop:~$ ls -l `locate matplotlib| grep pyc`

While considering matplotlib it seemed reasonable to indulge my laziness and apply my python skills. In this case I use wget to retrieve the python examples and then script them to run. The one at left is nice as it is an interactive plot and demonstrates control sliders. Sweet! The code could be cleaned up but again laziness dominates. In the process I discovered that some pyc modules should be refreshed due to some strange interactive complexity and so this shell one liner below solves that.


sudo python -c 'import pylab'
# -*- coding: utf-8 -*- funcy='python ' for child in soup.recursiveChildGenerator(): name = getattr(child, "name", None) if name is not None: if name == 'a': if '.py' in child['href']: if '#' not in child['href']: if '..' not in child['href']: z = webadd3+str(child['href']) print 'wget '+z else: z= string.replace(str(child['href']),'..',webadd2,1) print 'wget ' +z print funcy+os.path.basename(z)

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen