Re: [Tutor] Python in HTML

2005-05-22 Thread Orri Ganel
Thanks to all who helped. It looks like I figured out what the problem was, with the use of mozilla's DOM inspector, js debugger, and JSIDE (a javascript ide) that I downloaded after googling "javascript ide" (it appears to be quite good). In any case, the whole issue was checking whether or

Re: [Tutor] Python in HTML

2005-05-22 Thread Alan G
> >You still aren't telling us what happens. Its very hard to find > >a fault in a program when you have no idea what the problem is. > Well, the language being Javascript, I unfortunately don't know what > happened, because there are no IDE's for Javascript; it just fails > silently, as Liam put

Re: [Tutor] Python in HTML

2005-05-22 Thread Orri Ganel
Kent Johnson wrote: Liam Clarke wrote: Um, man, that's what I hate about Javascript, it fails silently. I've never met a Javascript console... /me ponders Firefox plugin. Firefox has a JavaScript console that can be helpful... Kent Many thanks. I was not aware of this. -- Email: sing

Re: [Tutor] Python in HTML

2005-05-22 Thread Orri Ganel
Alan G wrote: >HI Orri, > > > >>>OK, so what happened? >>> >>> > >You still aren't telling us what happens. Its very hard to find >a fault in a program when you have no idea what the problem is. >The code is very likely doing what you have asked it to do, >so when we read it it will seem t

Re: [Tutor] Python in HTML

2005-05-22 Thread Orri Ganel
EJP 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 opti

Re: [Tutor] Python in HTML

2005-05-22 Thread Liam Clarke
Yeah, I just found it. Embarrassed... document inspector is kinda cool too. On 5/23/05, Kent Johnson <[EMAIL PROTECTED] > wrote:Liam Clarke wrote:> Um, man, that's what I hate about _javascript_, it fails silently. I've > never met a _javascript_ console...>> /me ponders Firefox plugin.Firefox has

Re: [Tutor] Python in HTML

2005-05-22 Thread Kent Johnson
Liam Clarke wrote: > Um, man, that's what I hate about Javascript, it fails silently. I've > never met a Javascript console... > > /me ponders Firefox plugin. Firefox has a JavaScript console that can be helpful... Kent ___ Tutor maillist - Tutor@p

Re: [Tutor] Python in HTML

2005-05-22 Thread Alan G
HI Orri, > >OK, so what happened? You still aren't telling us what happens. Its very hard to find a fault in a program when you have no idea what the problem is. The code is very likely doing what you have asked it to do, so when we read it it will seem to 'work' at a superficial level. Without

Re: [Tutor] Python in HTML

2005-05-21 Thread Liam Clarke
Oops, I'm lazy - https://addons.mozilla.org/extensions/moreinfo.php?application=firefox&category=Developer%20Tools&numpg=10&id=216 There's a _javascript_ debugger.On 5/22/05, Liam Clarke <[EMAIL PROTECTED]> wrote: Well Orri, I found one bug, but I don't know if this'll fix it, it's in your co

Re: [Tutor] Python in HTML

2005-05-21 Thread Liam Clarke
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 _javas

Re: [Tutor] Python in HTML

2005-05-21 Thread EJP
> 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 > selec

Re: [Tutor] Python in HTML

2005-05-21 Thread Orri Ganel
Alan G wrote: >OK, so what happened? >Did you start just making the copy and playing the songs from the >copy? >Did that work OK? > >Does the random number generation work - I assume you tested that by >just writing out the sequence of numbers first? > >And finally when you use the random numbvers

Re: [Tutor] Python in HTML

2005-05-21 Thread Alan G
> specific bit of code I'm having trouble with is the part that selects a > random song from the playlist. To make sure every song is selected at > least once, i tried to copy the playlist and have it choose songs from > the copy, removing each song as it is played, and refilling the copy > when i

Re: [Tutor] Python in HTML

2005-05-21 Thread Orri Ganel
Alan G wrote: > The problem lies not on the server but on the client. > JavaScript support is embedded in every popular browser so it just > works, but none of them know about python. Even if they did it would > require the user to have Python installed, which you can't assume. > > It is possible

Re: [Tutor] Python in HTML

2005-05-21 Thread Alan G
> it would be a smart idea if I could figure out how to somehow replace > the javascript in the html with python. However, everything I've seen > online seems to require installing something on the server, which I The problem lies not on the server but on the client. JavaScript support is embedde

Re: [Tutor] Python in HTML

2005-05-20 Thread Liam Clarke
Hi Orri, I've pondered that too, and you're out of luck, I think. There is a _javascript_/XUL/XBL/XPCOM interface in Mozilla browsers, it's quite low level and messy, and there's an XPCOM/Python interface also, but it's quite beta and hard to use. You can use Python like PHP or Perl, but it does