Re: [Tutor] read in text file containing non-English characters

2012-01-13 Thread Steven D'Aprano
On 13/01/12 08:20, Francis P. Boscoe wrote: Given a simple text file of departments, capitals, longitude and latitude separated by commas Ahuachapán,Ahuachapán,-89.8450,13.9190 Cabañas,Sensuntepeque,-88.6300,13.8800 Cuscatlán,Cojutepeque,-88.9333,13.7167 I would like to know to how to read in

Re: [Tutor] Read in text file containing non-English characters

2012-01-13 Thread Walter Prins
Hi Francis, On 13 January 2012 14:52, Francis P. Boscoe wrote: >> I apologize for not including any code, but that's because I didn't have >> any. I had no idea where to even begin. I have a 450 page book on beginner >> Python programming and nothing like the above is in >there. Incidentally,

Re: [Tutor] Read in text file containing non-English characters

2012-01-13 Thread Martin A. Brown
Greetings Francis, : >You don't show even a snippet of code. If you are asking : >for help here, it is good form to show us your code. Since : >you don't state how you are reading the data and how you are : >printing the data, we can't help much. Here are some tips: : > : > * Consider l

Re: [Tutor] Read in text file containing non-English characters

2012-01-13 Thread Francis P. Boscoe
>You don't show even a snippet of code. If you are asking >for help here, it is good form to show us your code. Since >you don't state how you are reading the data and how you are >printing the data, we can't help much. Here are some tips: > > * Consider learning how to use the csv mod

Re: [Tutor] read in text file containing non-English characters

2012-01-12 Thread Martin A. Brown
Greetings Francis, You have entered the Unicode or multiple character set zone. This is the deep end of the pool, and even experienced practitioners have difficulty here. Fortunately, Python eases the burden on you, but this still requires some care. : Given a simple text file of departmen

Re: [Tutor] read in text file containing non-English characters

2012-01-12 Thread Marc Tompkins
On Thu, Jan 12, 2012 at 1:20 PM, Francis P. Boscoe wrote: > Given a simple text file of departments, capitals, longitude and latitude > separated by commas > > Ahuachapán,Ahuachapán,-89.8450,13.9190 > Cabañas,Sensuntepeque,-88.6300,13.8800 > Cuscatlán,Cojutepeque,-88.9333,13.7167 > > I would like

Re: [Tutor] read in text file containing non-English characters

2012-01-12 Thread Prasad, Ramit
>I would like to know to how to read in the file and then access arbitary rows >in the file, so that I can print a line such as: > Cabañas,Sensuntepeque,-88.6300,13.8800 >The capital of Cabañas is Sensuntepeque >while preserving the non-English characters >now, for example, I get >Cabañas Ma

[Tutor] read in text file containing non-English characters

2012-01-12 Thread Francis P. Boscoe
Given a simple text file of departments, capitals, longitude and latitude separated by commas Ahuachapán,Ahuachapán,-89.8450,13.9190 Cabañas,Sensuntepeque,-88.6300,13.8800 Cuscatlán,Cojutepeque,-88.9333,13.7167 I would like to know to how to read in the file and then access arbitary rows in the