TheSaint nob...@nowhere.net.no writes:
self.handle= \
xmlrpclib.ServerProxy('http://localhost:%s/rpc' %int(self.numport))
Couldn't you just try to call something via this handle, like
self.handle.aria2.getVersion()? If there's an error, then start aria2
as a daemon and try
Anssi Saari wrote:
Couldn't you just try to call something via this handle, like
self.handle.aria2.getVersion()? If there's an error, then start aria2
as a daemon and try again.
Very good, you're right. Furthermore I should avoid to call that function
several times. I think to join it with
GMail Felipe wrote:
For the ps command, have you seen the psuti module?
The link to it is: http://code.google.com/p/psutil/
You gave a brand new start :)
I bit of additional program to include into the package ;)
--
goto /dev/null
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, May 21, 2011 at 6:20 PM, TheSaint nob...@nowhere.net.no wrote:
Kushal Kumaran wrote:
That's how it is able to give you the status. So, if you
are using getstatusoutput, you will have only one instance of your
command running.
My intent is to launch only one program instance, which
Kushal Kumaran wrote:
You could look for a way to make aria2c not become a daemon and use
subprocess.Popen to start it. That gives you the PID and ways to see
if the process is still running
I see. It's a step that I've to get on my account. Unfortunately I'll have
to study it some more.
On 22/05/2011, at 10:41, TheSaint nob...@nowhere.net.no wrote:
Kushal Kumaran wrote:
You could look for a way to make aria2c not become a daemon and use
subprocess.Popen to start it. That gives you the PID and ways to see
if the process is still running
I see. It's a step that I've to
Kushal Kumaran wrote:
That's how it is able to give you the status. So, if you
are using getstatusoutput, you will have only one instance of your
command running.
My intent is to launch only one program instance, which will goes as daemon.
To avoid a second call I'd like rather to use Python
Miki Tebeka wrote:
The best module for doing such things is subprocess. And the Popen object
has a pid attribute
I knew that, it's my fault that I'm not good to manage with popen. I found
simplier to use subprocess.getstatusoutput. Maybe this function doesn't
return the child pid, so I
On Thu, May 19, 2011 at 9:32 PM, TheSaint nob...@nowhere.net.no wrote:
hello,
I'm using to launch a program by subprocess.getstatusoutput. I'd like to
know whether I can get the program ID, in order to avoid another launch.
For clarity sake, I'm calling aria2 (the download manager for linux)
hello,
I'm using to launch a program by subprocess.getstatusoutput. I'd like to
know whether I can get the program ID, in order to avoid another launch.
For clarity sake, I'm calling aria2 (the download manager for linux) and I
wouldn't like to call one more instance of it. So what will I use
The best module for doing such things is subprocess. And the Popen object has a
pid attribute
(http://docs.python.org/library/subprocess.html#subprocess.Popen.pid)
--
http://mail.python.org/mailman/listinfo/python-list
11 matches
Mail list logo