![]() |
#1
|
|||
|
|||
input from a text file
Hi there
I'm designing an experiment in which I read input values off a text file. The text file has 5 columns, the first two containing numbers and the other 3 Greek words. I use the following code: s = line.split() myTrial = [float(s[0]),float(s[1]),s[2],s[3],s[4]] But, I'm running into a problem. If I save the the text file in ANSI format then the numbers are read correctly but the words when displayed by vizard come up as scrambled characters. If I save the text file in UTF-8 then the text shows up correctly in Greek but then vizard gives me an error when reading the numbers (I know that the text shows up correctly because I tried a text file without the numbers and it works fine). I don't know much about character encoding so I'm not sure if there is an easy solution to this problem. One option is to have numbers and text in separate text files but this defeats the purpose of my using an input file to simplify experiment design. Any ideas? Thanks in advance! marios |
Tags |
foreign text, text input |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use saved text file data as replay sources problem | mizutani_jun | Vizard | 4 | 10-14-2010 04:49 PM |
problems with output to a text file within executable | Saz | Vizard | 1 | 07-01-2009 11:01 AM |
How to input several model files and then save one output file | mspusch | Vizard | 1 | 07-15-2008 10:30 PM |
file input | vsully | Vizard | 1 | 12-21-2004 10:51 PM |
I cannot show wrl file with text node | sled | Vizard | 3 | 06-25-2003 07:52 AM |