[Tutor] Python in HTML

Liam Clarke cyresse at gmail.com
Sun May 22 07:34:00 CEST 2005


Well Orri, 

I found one bug, but I don't know if this'll fix it, it's in your copy 
playlist bit though. 

> for (var index = 0; index < songs.length; playable++)
>{
>playable[index] = songs[index];
>}
>}

I believe you want to increment index, not playable.

Um, man, that's what I hate about Javascript, it fails silently. I've never 
met a Javascript console...

/me ponders Firefox plugin.

Good luck,

Liam Clarke
On 5/22/05, EJP <ejp at zomething.com> wrote:
> 
> 
> > Well, like I said, the darkplayer is on an online journal, which means
> > that the only output possible is modifying the option strings of songs
> > as they are played or something similar. I do know that the random
> > number generator works, and the songs played always match the option
> > selected. However, this was before adding the bit about copying the
> > songs and playing from the copy. The last fully functional version
> > (without the 'play all songs once' feature) is as follows:
> >
> > <object id=darkplayer
> > codeBase=
> http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701
> > type=application/x-oleobject height=0 standby="Loading Microsoft
> > Windows
> > Media Player components..." width=0
> > classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95>
> > <PARAM NAME VALUE>
> 
> 
> It's a bit off list topic, but I am interested to know how much 
> functionality you have been successful to get going. I tried something very 
> similar with Quicktime and Javascript, but seemed to wind up at a dead-end. 
> My (premature?) conclusion was that once the audio player object was loaded, 
> I could not reset certain parameters _in_that_object_ such as I would need 
> to have it play an arbitrary file (url).
> 
> My javascript was successful in changing the page parameters, as verified 
> with DOM and print statements, but there seemed nothing to trigger the audio 
> player to recognize those new parameters.
> 
> IMO the great thing about Javascript is that you have a whole gui & 
> application tied to it, so you can do a lot with very little code (sheer 
> candy!); but the downside follows, that there you are utilizing a complex, 
> fixed framework which constrains what you can do (bitter aftertaste)... and, 
> of course, the development environment is not quite Pythonic.
> 
> 
> I hope you can get your Javascript - Windows Media Player interface to 
> work. Unfortunately, I do not know how Python could be used within that 
> interface...
> 
> Good luck!
> 
> 
> 
> 
> Eric Pederson
> http://www.songzilla.blogspot.com
> 
> 
> :::::::::::::::::::::::::::::::::::
> domainNot="@something.com <http://something.com>"
> domainIs=domainNot.replace("s","z")
> ePrefix="".join([chr(ord(x)+1) for x in "do"])
> mailMeAt=ePrefix+domainIs
> :::::::::::::::::::::::::::::::::::
> 
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 



-- 
'There is only one basic human right, and that is to do as you damn well 
please.
And with it comes the only basic human duty, to take the consequences.'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20050522/423a6fdd/attachment.html


More information about the Tutor mailing list