Re: A Unicode problem -HELP
- From: "Martin v. Löwis" <martin@xxxxxxxxxxx>
- Date: Wed, 17 May 2006 07:08:54 +0200
manstey wrote:
input_file = open(input_file_loc, 'r')
output_file = open(output_file_loc, 'w')
for line in input_file:
output_file.write(str(word_info + parse + gloss)) # = three
functions that return tuples
(u'F', u'\u0254') are two of the many unicode tuple elements returned
by the three functions.
What am I doing wrong?
Well, the primary problem is that you don't tell us what you are really
doing. For example, it is very hard to believe that this is the actual
code that you are running:
If word_info, parse, and gloss are functions, the code should read
input_file = open(input_file_loc, 'r')
output_file = open(output_file_loc, 'w')
for line in input_file:
output_file.write(str(word_info() + parse() + gloss()))
I.e. you need to call the functions for this code to make any sense.
You have probably chosen to edit the code in order to not show us
your real code. Unfortunately, since you are a newbie in Python,
you make errors in doing so, and omit important details. That makes
it very difficult to help you.
Regards,
Martin
.
- Follow-Ups:
- Re: A Unicode problem -HELP
- From: manstey
- Re: A Unicode problem -HELP
- References:
- A Unicode problem -HELP
- From: manstey
- Re: A Unicode problem -HELP
- From: "Martin v. Löwis"
- Re: A Unicode problem -HELP
- From: manstey
- A Unicode problem -HELP
- Prev by Date: Re: assignment in a for loop
- Next by Date: Re: assignment in a for loop
- Previous by thread: Re: A Unicode problem -HELP
- Next by thread: Re: A Unicode problem -HELP
- Index(es):