Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 8:48 am, MRAB wrote: > Arlie wrote: > > Hi, > > > Newbie here. I copied and pasted the code below. But when I ran it I > > got this error: > > > D:\>python mp3.py > > Duree du fichier :  298919  millisecondes > > Traceback (most recent call last): > >   File "mp3.py", line 37, in > >  

Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 8:07 am, Tim Harig wrote: > On 2009-06-19, Arlie wrote: > > > print 'Duree du fichier : ',buf,' millisecondes' > > You can obviously make sure that 'buf' can be accessed as a string. > > > time.sleep(int(buf)/1000) > > The error seems to be having issues converting buf to an int.  Coul

Re: Play MP3s from Windows

2009-06-19 Thread MRAB
Arlie wrote: Hi, Newbie here. I copied and pasted the code below. But when I ran it I got this error: D:\>python mp3.py Duree du fichier : 298919 millisecondes Traceback (most recent call last): File "mp3.py", line 37, in time.sleep(int(buf)/1000) ValueError: invalid literal for int()

Re: Play MP3s from Windows

2009-06-19 Thread Tim Harig
On 2009-06-19, Arlie wrote: > print 'Duree du fichier : ',buf,' millisecondes' You can obviously make sure that 'buf' can be accessed as a string. > time.sleep(int(buf)/1000) The error seems to be having issues converting buf to an int. Could you possibly convert it to a string before converti

Re: Play MP3s from Windows

2009-06-19 Thread Tim Harig
On 2009-06-19, Arlie wrote: > Hi, > > Newbie here. I copied and pasted the code below. But when I ran it I > got this error: > > D:\>python mp3.py > Duree du fichier : 298919 millisecondes > Traceback (most recent call last): > File "mp3.py", line 37, in > time.sleep(int(buf)/1000) > Valu

Re: Play MP3s from Windows

2009-06-19 Thread Arlie
On Jun 20, 7:16 am, Arlie wrote: > Hi, > > Newbie here. I copied and pasted the code below. But when I ran it I > got this error: > > D:\>python mp3.py > Duree du fichier :  298919  millisecondes > Traceback (most recent call last): >   File "mp3.py", line 37, in >     time.sleep(int(buf)/1000) >

Play MP3s from Windows

2009-06-19 Thread Arlie
Hi, Newbie here. I copied and pasted the code below. But when I ran it I got this error: D:\>python mp3.py Duree du fichier : 298919 millisecondes Traceback (most recent call last): File "mp3.py", line 37, in time.sleep(int(buf)/1000) ValueError: invalid literal for int() with base 10: '