Re: [Tutor] clearing a text document

2007-08-29 Thread Luke Paireepinart
max baseman wrote: > right it's for a quick math "game" the rules are simple you start > with any number to get the next number you, a. if it's odd multiply > by 3 than add 1 or b. if it's even divide by two, the point of this > is to see how long it takes to get to one are it starts to repe

Re: [Tutor] clearing a text document

2007-08-29 Thread max baseman
right it's for a quick math "game" the rules are simple you start with any number to get the next number you, a. if it's odd multiply by 3 than add 1 or b. if it's even divide by two, the point of this is to see how long it takes to get to one are it starts to repeat 4,2,1,4,2,1... now im

Re: [Tutor] Trouble with script not parsing out text

2007-08-29 Thread Eric Brunson
Tim Finley wrote: > I get the following when running a script. > > TypeError: argument 1 must be string or read-only character buffer, > not _sre.SRE_Pattern First, please post the entire error report when asking for help. In this case I can tell you what the problem is, but in others the con

Re: [Tutor] Trouble with script not parsing out text

2007-08-29 Thread Kent Johnson
Tim Finley wrote: > I get the following when running a script. > > TypeError: argument 1 must be string or read-only character buffer, not > _sre.SRE_Pattern > > Here is the script I am trying to run. I am trying to verify that my > search is returning what I am trying to search for, but du

Re: [Tutor] Code reading for learning Python

2007-08-29 Thread Kent Johnson
Alessandro Dantas wrote: > Hello Everyone, > > I'm learning Python and my preferred method for learning a new language > is to read code written by experts. I guess it makes even more sense in > Python since I've been hearing so much about how your code should be > pythonic to benefit from all

[Tutor] Trouble with script not parsing out text

2007-08-29 Thread Tim Finley
I get the following when running a script.   TypeError: argument 1 must be string or read-only character buffer, not _sre.SRE_Pattern   Here is the script I am trying to run.   I am trying to verify that my search is returning what I am trying to search for, but due to the error I can verif

Re: [Tutor] clearing a text document

2007-08-29 Thread Alan Gauld
"max baseman" <[EMAIL PROTECTED]> wrote > quick question how would i clear a text document? A bit of context? If its a file you just open the file for writing. If its a list of strings in memory text = [] will clear it... If its a GUI text widget it will depend on which framework you are us

Re: [Tutor] Code reading for learning Python

2007-08-29 Thread Alan Gauld
"Alessandro Dantas" <[EMAIL PROTECTED]> wrote > Can anyone suggest some good pieces of (pythonic???) code? The samples that come with python? The standard library modules? The IDLE IDE? Most of the sourceforge Python projects... Should be enough reading there... :-) Alan G _

[Tutor] Code reading for learning Python

2007-08-29 Thread Alessandro Dantas
Hello Everyone, I'm learning Python and my preferred method for learning a new language is to read code written by experts. I guess it makes even more sense in Python since I've been hearing so much about how your code should be pythonic to benefit from all the language can offer. Can anyone s

Re: [Tutor] tagging pieces of information

2007-08-29 Thread Gonzillaaa
Have a look at Tasty last time I checked it was postgres centric, it might have changed now. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

[Tutor] clearing a text document

2007-08-29 Thread max baseman
quick question how would i clear a text document? ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] tagging pieces of information

2007-08-29 Thread Che M
> > Hi, I am curious about ways in Python to approach the idea of "tagging" > > pieces of information much in the way that one can tag favorite websites > > like on the site Del.icio.us. I'm not sure if tagging is the best term >for > > this (due to confusion with HTML tags), but the idea would

Re: [Tutor] A replacement for a "for" loop

2007-08-29 Thread Terry Carroll
On Wed, 29 Aug 2007, Scott Oertel wrote: > John Fouhy wrote: > > On 29/08/07, Trey Keown <[EMAIL PROTECTED]> wrote: > > > >> attrs={u'title': u'example window title', u'name': u'SELF', u'icon': > >> u'e.ico'} > >> keys = ['name','title','icon'] > >> for (tag, val) in attrs.iteritems(): > >>

Re: [Tutor] A replacement for a "for" loop

2007-08-29 Thread Scott Oertel
John Fouhy wrote: > On 29/08/07, Trey Keown <[EMAIL PROTECTED]> wrote: > >> attrs={u'title': u'example window title', u'name': u'SELF', u'icon': >> u'e.ico'} >> keys = ['name','title','icon'] >> for (tag, val) in attrs.iteritems(): >> for key in keys: >> print val >> >> the first "fo

Re: [Tutor] Newbie

2007-08-29 Thread bhaaluu
On 8/28/07, Toby Holland <[EMAIL PROTECTED]> wrote: > HI all, > I was wondering if any of you had any advice as to where I should start in > regards to learning using and programing with Python. I have wanted to > learn a program language for some time and just felt that now was good and I > have