[Tutor] Anagram creator

2008-12-27 Thread btkuhn
Hi everyone, I'm having trouble with an anagram generating program that I am writing in Python. My output is not what it should be and I think the reason has something to do with my helper functions creating a reference to a dictionary each time it is called rather than a new "clone" dictionar

Re: [Tutor] Redux: optparse

2008-12-27 Thread Matt Herzog
> Do you want to use optparse, or get the command line arguments yourself? > It seems the pattern string will be the first arg, will it? Again I am confused. I assumed that optparse was the best way to pass in arguments (such as filenames) from the command line. Like so: ./script.py -x r

Re: [Tutor] Redux: optparse

2008-12-27 Thread spir
Le samedi 27 décembre 2008 à 14:55 -0500, Matt Herzog a écrit : > On Wed, Dec 24, 2008 at 01:12:55AM -, Alan Gauld wrote: > > > > "Kent Johnson" wrote > > > > >> for filename in os.listdir(directory): > > >> result = re.match(s, filename) > > >> print result > > > > > >You

[Tutor] Redux: optparse

2008-12-27 Thread Matt Herzog
On Wed, Dec 24, 2008 at 01:12:55AM -, Alan Gauld wrote: > > "Kent Johnson" wrote > > >> for filename in os.listdir(directory): > >> result = re.match(s, filename) > >> print result > > > >You never open and read the files. You are searching for the pattern > >in the filenam

Re: [Tutor] Repply

2008-12-27 Thread W W
On Sat, Dec 27, 2008 at 3:42 AM, Alan Gauld wrote: > > Its C rather than C++. > The <> in include statements are a variation on the "" which can also be > used. > The differences are subtle and have to do with the search path I think. But > its > been so long since I did serious C/++ I can't recal

Re: [Tutor] Repply

2008-12-27 Thread Alan Gauld
"prasad rao" wrote http://svn.python.org/view/python/trunk/Objects/listobject.c?rev=67498&view=markup Kent ! This is grek and latin to me.From the presence of header files it looks C++.But headerfiles are not between '<' and '>' . Its C rather than C++. The <> in include statements are