Re: [Tutor] Trying to access a random value in a list

2012-01-13 Thread Steven D'Aprano
On 13/01/12 10:56, Nick W wrote: first problem: easy fix just remember that len() returns the actual number of items in the list but that list is indexed starting at 0 so just replace your line of pick = len(names) with: pick = len(names) - 1 Another good trick for choosing a

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] Tkinter event handler

2012-01-13 Thread CF
I apologize, I didn't realize how tired I was. I've got it working, sort of, after finding the event.char attribute. I needed it to work via keyboard since I don't use a mouse often and I'm running this with awesome-wm's launcher so it can't get input from the terminal (as far as I know) and I didn

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] Are there other ways of solving this exercise?

2012-01-13 Thread amt
Wow!!! Thanks so much for your reply. It was so nicely written and I understood everything you said. Thanks again, have a nice weekend. Regards, Amt. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mai

Re: [Tutor] PYTHONPATH (Mac OS X)

2012-01-13 Thread David Rock
* Stayvoid [2011-12-30 16:11]: > >You don't have any option. > >You either type in the full path or you get the user to tell you > >in some way - either with a prompt or via an input argument. > > OK, now I get it. > > How can I tell this to the end-user? > Should I write a README file or what?

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] Tkinter event handler

2012-01-13 Thread Alan Gauld
On 13/01/12 03:44, Chase Franklin wrote: I'd like to include the class name so that it becomes: 001_Jan_12_2012_CLASSNAME.org So I have a simple Tk window that is populated by a list of class names. What is a "Simple Tk window"? There is no such widget. So what is the window using to list the