[Alsaplayer-devel]python interface plugin]

Andy Lo A Foe andy@alsaplayer.org
Sat, 13 Apr 2002 02:00:31 +0200

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Content-Type: message/rfc822
Content-Disposition: inline

Date: Sat, 13 Apr 2002 01:59:06 +0200
From: Andy Lo A Foe <andy@alsaplayer.org>
To: evgeny@omsktelecom.ru
Subject: Re: [Alsaplayer-devel]python interface plugin
Message-ID: <20020412235906.GA5338@orbital.xs4all.nl>
References: <20020413063149.705b504d.codedj@echo.ru> <20020412234049.GA5238@orbital.xs4all.nl> <20020413065004.04897059.codedj@echo.ru>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20020413065004.04897059.codedj@echo.ru>
User-Agent: Mutt/1.3.28i
X-Mailer: Mutt http://www.mutt.org/
X-Uptime: 17:22
X-URL: http://www.loafoe.net

On Sat, Apr 13, 2002 at 06:50:04AM +0700, Evgeny Chukreev wrote:

> #!/usr/local/bin/alsaplayer -i python
> import alsaplayer, time
> playlist = alsaplayer.get_playlist ()
> playlist.insert (["/tmp/0.mp3", "/tmp/1.mp3"], 0)
> playlist.play (0)
> time.sleep (10)
> --- ---

Okay, does it work standalone? i.e. do you get a pyhton interpreter
prompt (?) when you just execute /usr/local/bin/alsaplayer -i python
from the command line? As I understand it the #! construction simply
sends everything in the rest of the file to the stdin of the program
that is given on that line.

> Strange but this headers works fine.
> #!/usr/local/bin/alsaplayer --help
> #!/usr/local/bin/alsaplayer -v

Yes, these commands print something and exit immediately, so it will
always work.