object exported through manager from multiprocess module

2010-07-08 Thread Tomas Pelka
nit/controllers/sniffer.py", line 143, in index worker.terminate() File "", line 2, in terminate File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod raise convert_to_error(kind, result) AttributeError: 'NoneType' object has no attribute 'terminate' Which is strange from my point of view, don't you think? Thanks for advices, cheers -- Tomas Pelka -- http://mail.python.org/mailman/listinfo/python-list

Re: how to run part of my python code as root

2010-02-06 Thread Tomas Pelka
sjdevn...@yahoo.com wrote: > On Feb 4, 2:05 pm, Tomas Pelka wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Hey, >> >> is there possibility how to run part of my code (function for example) >> as superuser. >> >> Or on

how to run part of my python code as root

2010-02-04 Thread Tomas Pelka
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, is there possibility how to run part of my code (function for example) as superuser. Or only way how to do this is create a wrapper and run is with Popen through sudo (but I have to configure sudo to run "whole" python as root). Thanks for advi

Re: subprocess troubles

2010-01-21 Thread Tomas Pelka
On 01/21/2010 11:39 AM, Javier Collado wrote: Hello, If you set shell=False, then I think that arg2 should be separated into two different parts. Also, arg3 could be set just to pattern (no need to add extra spaces or using str function). Best regards, Javier 2010/1/21 Tomas Pelka

subprocess troubles

2010-01-21 Thread Tomas Pelka
Hey all, have a problem with following piece of code: -- import subprocess paattern = "python" cmd = "/usr/bin/locate" arg1 = " -i" arg2 = " -d /var/www/books/mlocate.db" arg3 = str(" " + pattern) p1 = subprocess.Popen([cmd, arg1, arg2, arg3], sh