Re: [Tutor] Adding to a CSV file?

2010-08-29 Thread Greg Bair
On 08/29/2010 02:12 PM, aenea...@priest.com wrote: > > Hi, > > I'm learning Python so I can take advantage of the really cool stuff in the > Natural Language Toolkit. But I'm having problems with some basic file > manipulation stuff. > > My basic question: How do I read data in from a csv, m

Re: [Tutor] question about import statement

2010-08-26 Thread Greg Bair
On 08/26/2010 10:29 PM, Hugo Arts wrote: > On Thu, Aug 26, 2010 at 9:16 PM, Bill Allen wrote: >> >> I did try that and of course it gave an error because it was necessary. I >> just did not know why. However, I later found an explanation on the web. >> Here it is: >> >> from tkinter import * >>

Re: [Tutor] why does this fail

2010-08-25 Thread Greg Bair
On 08/25/2010 06:00 AM, Roelof Wobben wrote: > > Hello, > > > > I have this programm : > > > > def remove_letter(letter, strng): > """ > >>> remove_letter('a', 'apple') > 'pple' > >>> remove_letter('a', 'banana') > 'bnn' > >>> remove_letter('z', 'banana')

Re: [Tutor] continuous running of a method

2010-08-24 Thread Greg Bair
On Mon, Aug 23, 2010 at 8:21 PM, bob gailer <mailto:bgai...@gmail.com>> wrote: On 8/23/2010 1:00 AM, Greg Bair wrote: I have a method (I'll call it foo) that will either return None or an object depending on a random value generated. What I want to

Re: [Tutor] continuous running of a method

2010-08-22 Thread Greg Bair
On 08/23/2010 01:10 AM, James Mills wrote: On Mon, Aug 23, 2010 at 3:00 PM, Greg Bair wrote: I have a method (I'll call it foo) that will either return None or an object depending on a random value generated. What I want to happen is that if I call foo(), i.e, f = foo() and it re

[Tutor] continuous running of a method

2010-08-22 Thread Greg Bair
I have a method (I'll call it foo) that will either return None or an object depending on a random value generated. What I want to happen is that if I call foo(), i.e, f = foo() and it returns None, to re-call it until it returns something else. I would think this would be done with a while l