Re: what IDE is the best to write python?

2009-02-02 Thread Willi Richert
Hi, I used eclipse/pydev quite some time. What pulled me back into the arms of emacs was: - ability to save bookmarks (meaning a point in a file) at all the keystrokes. Never found out how to do that in eclipse. In emacs I have now all the times "j" save at the current working position, "f"

Re: Integrating awk in Python

2009-01-16 Thread Willi Richert
Hi, take a look at the 5th link at http://tinyurl.com/7s8kfq It's called pyawk. Regards, wr Am Freitag, 16. Januar 2009 13:02:59 schrieb Alfons Nonell-Canals: > Hello, > I'm developing a software package using python. I've programmed all > necessary tools but I have to use other stuff from other

Re: initialising a class by name

2009-01-14 Thread Willi Richert
Hi, try the following exemplarily for the os module import os, types [(c, klass) for (c,klass) in os.__dict__.items() if type(klass)==types.ClassType] will print: [('_Environ', )] Regards, wr Am Mittwoch, 14. Januar 2009 10:55:27 schrieb Krishnakant: > On Wed, 2009-01-14 at 00:39 -0800, Chris

Re: Multiple values for one key

2008-08-28 Thread Willi Richert
Hi, try defaultdict: In [1]: from collections import defaultdict In [2]: d=defaultdict(list) In [3]: d[1].append(7) In [4]: d[1].append(8) In [5]: d Out[5]: defaultdict(, {1: [7, 8]}) In [6]: d[1] Out[6]: [7, 8] Regards, wr Am Donnerstag 28 August 2008 19:02:55 schrieb Ron Brennan: > I hav

Re: Getting pid of a remote process

2008-08-19 Thread Willi Richert
Hallo, if the remote machines allow ssh login, you might try my SSHRemoteController (a combination of ssh and pexpect). Basically, it simulates a user typing something at the console. Then you can conveniently issue commands at the remote machine like "ps ax | grep cmd". http://www.richert.de/

Re: Development for dual core machine

2007-08-20 Thread Willi Richert
Andy wrote: > Thanks guys for the suggestions. > > Andy It might be that you have to set the CPU affinity for your python process so that it works at all. I had that problem on a dual core machine with hyperthread enabled. Using taskset (http://www.linuxcommand.org/man_pages/taskset1.html) helpe

Re: Getting to an SSH account over a HTTP proxy

2007-01-23 Thread Willi Richert
Am Dienstag, 23. Januar 2007 02:16 schrieb Nanjundi: > BJörn Lindqvist wrote: > > I want to use Python to connect to a SSH account over a HTTP proxy to > > automate some operations. I thought paramiko would be able to do that, > > but it can not (it seems). > > > > Is there some other Python module

Pythonic A*-Algorithm

2007-01-11 Thread Willi Richert
Hi, I'm looking for an A* implementation in Python (at least some wrapper around a C lib). So far I've only found http://arainyday.se/projects/python/AStar/ which looks not so promising. http://wiki.python.org/moin/PythonGraphApi lists all major available graph libraries in Python, hoping to f

Priority based concurrent execution

2006-09-21 Thread Willi Richert
Hi, I have a simulation application (PlayerStage) in which the robot is asked every ~200ms for an action. In the meantime the robot has to do some calculation with the perception. As the calculation gets more and more time consuming I am thinking about outsourcing it into a concurrently running