On Wed, 13 Oct 2010 06:30:15 -0700, Martin Landa wrote: > is there a way how to send command from python script to the shell > (known id) from which the python script has been called?
By using psutil (http://code.google.com/p/psutil/): giampa...@ubuntu:~$ python Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56) [GCC 4.4.5] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import psutil, os >>> me = psutil.Process(os.getpid()) >>> me.name 'python' >>> parent = me.parent >>> parent.name 'bash' >>> parent.kill() Regards, --- Giampaolo http://code.google.com/p/pyftpdlib/ http://code.google.com/p/psutil/ -- http://mail.python.org/mailman/listinfo/python-list