how to get information of a running prog in python
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Tue May 13 04:41:35 EDT 2008
En Tue, 13 May 2008 01:22:52 -0300, Ivan Illarionov
<ivan.illarionov at gmail.com> escribió:
> On Mon, 12 May 2008 20:29:46 -0700, George Sakkis wrote:
>>> > On Mon, May 12, 2008 at 10:19 PM, Jimmy <mcknight0... at gmail.com>
>>> > wrote:
>>>
>>> > > can anyone tell me, in python, how to obtain some information of
>>> > > a running program?
>>> > > paticularly, if i am playing some music in audacious or other
>>> > > media player, how can i get the the name and some other info of
>>> > > current playing song? It seems that audicious doesn't output on
>>> > > run-time --
>>>
>> Your best bet is if the *specific* program you're interested in (e.g.
>> audacious) exposes this information programmatically in some way. It's
>> up to the developers of this application if and how they choose to do
>> it. Even if they do it, there's no requirement that the same API will
>> work for any other program of the same category, unless there is some
>> popular industry standard that most applications implement.
>
> George, have you read my post in this thread? What OP wants is actually
> possible and it's quite easy. X server is the "superprogram" that knows
> the names of all GUI window titles.
That relies on the fact that audacious (or whatever player used) actually
includes the song name as part of its window title. As G. Sakkis said,
this depends on the specific program used. And what about "some other info
of current playing song"?
--
Gabriel Genellina
More information about the Python-list
mailing list