[Alsaplayer-devel]python interface plugin

Evgeny Chukreev codedj@echo.ru
Sat, 13 Apr 2002 07:12:30 +0700


On Sat, 13 Apr 2002 01:59:06 +0200, Andy Lo A Foe <andy@alsaplayer.org> wrote:

ALAF> > #!/usr/local/bin/alsaplayer -i python
ALAF> > import alsaplayer, time
ALAF> > 
ALAF> > playlist = alsaplayer.get_playlist ()
ALAF> > 
ALAF> > playlist.insert (["/tmp/0.mp3", "/tmp/1.mp3"], 0)
ALAF> > playlist.play (0)
ALAF> > 
ALAF> > time.sleep (10)
ALAF> > --- ---
ALAF> Okay, does it work standalone? i.e. do you get a pyhton interpreter
ALAF> prompt (?)
ALAF> when you just execute /usr/local/bin/alsaplayer -i python
ALAF> from the command line?
yes

ALAF> As I understand it the #! construction simply
ALAF> sends everything in the rest of the file to the stdin of the program
ALAF> that is given on that line.
yes.. but alsaplayer does not load python or text (with -i text) plugin at all...

ALAF> > Strange but this headers works fine.
ALAF> > #!/usr/local/bin/alsaplayer --help
ALAF> > #!/usr/local/bin/alsaplayer -v
ALAF> Yes, these commands print something and exit immediately, so it will
ALAF> always work.
#!/usr/local/bin/alsaplayer -v -v
does not work! ;) It starts gtk plugin!
It looks like alsaplayer doesn't see more than two options in such
context (#!)!
becouse if I type 'alsaplayer -v -v' in command line AP shows me version
;)

-- 
... Evgeny ... [Nothing]