Re: Python nuube needs Unicode help

2007-01-12 Thread [EMAIL PROTECTED]
Diez, you are awesome! This works! Thank you so much!!! You are so awesome! Diez B. Roggisch wrote: > [EMAIL PROTECTED] wrote: > > > Can you attach files in this forum? Couldn't find the option. Oh well, > > here's the file. > > > > #!/usr/bin/python > > # Version: 1.1 > > # Author: Steve Losh >

Re: Python nuube needs Unicode help

2007-01-12 Thread Diez B. Roggisch
[EMAIL PROTECTED] wrote: > Can you attach files in this forum? Couldn't find the option. Oh well, > here's the file. > > #!/usr/bin/python > # Version: 1.1 > # Author: Steve Losh > > from sets import Set > from optparse import OptionParser > from xml.dom.minidom import parse > > AudioPath

Re: Python nuube needs Unicode help

2007-01-12 Thread [EMAIL PROTECTED]
Can you attach files in this forum? Couldn't find the option. Oh well, here's the file. #!/usr/bin/python # Version: 1.1 # Author: Steve Losh from sets import Set from optparse import OptionParser from xml.dom.minidom import parse AudioPath = 'audio/' DatafilePath = 'utterances.trmxml' CON

Re: Python nuube needs Unicode help

2007-01-12 Thread Peter Otten
[EMAIL PROTECTED] wrote: > HELP! > Guy who was here before me wrote a script to parse files in Python. > > Includes line: > print u According to your other posts 'u' seems to be an instance of a custom Utterance class with a __str__() method that accidentally returns unicode. Try changing the pr

Re: Python nuube needs Unicode help

2007-01-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Chris Mellon wrote: > On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > >> > audio="313-20070102144528.wav" grammarSet="G3" rawText="não" >> recValue="{data:CHOICE=NO;}" conf="970" rawText2="" conf2="0" >> transcribedText="não" parsableText="nã

Re: Python nuube needs Unicode help

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 20:42, [EMAIL PROTECTED] wrote: Progress! You managed to change the error message. File "./acc_test_script_generator.py", line 106, in loadData print u.encode('utf-8') AttributeError: Utterance instance has no attribute 'encode' I'm missing somethign really obviou

Re: Python nuube needs Unicode help

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 18:27, [EMAIL PROTECTED] wrote: >HELP! >Guy who was here before me wrote a script to parse files in Python. > >Includes line: >print u >where u is a line from a file we are parsing. >However, we have started recieving data from Brazil. If I open file to >parse in VI, looks li

Re: Python nuube needs Unicode help

2007-01-11 Thread [EMAIL PROTECTED]
Yeah, that's what i don't know how to do. Chris Mellon wrote: > On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> wrote: > > HELP! > > Guy who was here before me wrote a script to parse files in Python. > > > > Includes line: > > print u > > where u is a line from a file we ar

Re: Python nuube needs Unicode help

2007-01-11 Thread [EMAIL PROTECTED]
Progress! You managed to change the error message. File "./acc_test_script_generator.py", line 106, in loadData print u.encode('utf-8') AttributeError: Utterance instance has no attribute 'encode' I'm missing somethign really obvious here, but I don't know what it is... Diez B. Roggisch

Re: Python nuube needs Unicode help

2007-01-11 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > HELP! > Guy who was here before me wrote a script to parse files in Python. > > Includes line: > print u > where u is a line from a file we are parsing. > However, we have started recieving data from Brazil. If I open file to > parse in VI, looks like: > > audio="313

Re: Python nuube needs Unicode help

2007-01-11 Thread Chris Mellon
On 11 Jan 2007 13:28:14 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > HELP! > Guy who was here before me wrote a script to parse files in Python. > > Includes line: > print u > where u is a line from a file we are parsing. > However, we have started recieving data from Brazil. If I open fil