Re: [ecasound] Re: pyeca questions

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [ecasound] Re: pyeca questions
From: janne halttunen (janneSPAM_AT_fbn.homeip.net)
Date: Wed Jun 30 2004 - 08:43:28 EEST


On Tue, 29 Jun 2004 18:33:33 -0400
Paul Winkler <pw_lists_AT_slinkp.com> wrote:

> another q:
> if a command returns a string in ecasound -c, should the same
> command return a string to python when invoked via .command()?
> I seem to always get None from all calls to .command().

You can get the result from the .last_string method of the object.
Alternatively you could use ecacontrol module, which returns the value straight from .command method (whatever the type).

>>> import ecacontrol
>>> e=ecacontrol.ECA_CONTROL_INTERFACE()
...
>>> e.command('cs-list')
['command-line-setup']

or just

>>> e('cs-list')
...

in there is also EIAM class, which exports ecasound commands as python methods, but it's currently not guarateed to work perfect (dirrrty hack).

>>> ei=ecacontrol.EIAM()
>>> ei.cs_list()
...

janne


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Jun 30 2004 - 08:32:34 EEST