Re: [Tutor] StringIO

2006-05-23 Thread Kent Johnson
kakada wrote: > Actually, what I want is creating a kind of file that is just located in > memory not file system. > I want to have a filename for my convert(inputFileName, outputFileName) > How can I get filename? > doing: > fin.name() is impossible! Rewrite convert so it takes file-like objects

[Tutor] I'm drawing a blank on a simple (?) regex

2006-05-23 Thread R. Alan Monroe
I'm searching through SQL logs and want to find lines that have WHERE-less (unbounded) queries. I can't come up with a regex to say: SELECT.*FROM.*(the word WHERE must not exist anywhere in the remainder of the line) Am I forgetting something simple or would this take two passes? Alan _

Re: [Tutor] I'm drawing a blank on a simple (?) regex

2006-05-23 Thread Kent Johnson
R. Alan Monroe wrote: > I'm searching through SQL logs and want to find lines that have > WHERE-less (unbounded) queries. I can't come up with a regex to say: > > SELECT.*FROM.*(the word WHERE must not exist anywhere in the remainder > of the line) > > Am I forgetting something simple or would th

Re: [Tutor] OT: any good newsgroup or other forum for MP3 internals discussions?

2006-05-23 Thread Terry Carroll
On Mon, 22 May 2006, [ISO-8859-1] Hugo Gonz?lez Monteverde wrote: > Are you using any kind of prefabricated Python module for this? Maybe > their implementation of MP3 tagging is enlightening to you. I started to; I started using the mp3.py module found here: http://www.dotfunk.com/projects/mp3

Re: [Tutor] I'm drawing a blank on a simple (?) regex

2006-05-23 Thread R. Alan Monroe
> R. Alan Monroe wrote: >> I'm searching through SQL logs and want to find lines that have >> WHERE-less (unbounded) queries. I can't come up with a regex to say: >> >> SELECT.*FROM.*(the word WHERE must not exist anywhere in the remainder >> of the line) >> >> Am I forgetting something simple or

Re: [Tutor] problem with class - get message that self is not defined

2006-05-23 Thread Bob Gailer
Alan Gauld wrote: >> When I try to use the class listed below, I get the statement that >> self >> is not defined. >> >> test=TriggerMessage(data) >> var = test.decode(self.qname) >> >> I would have thought that self would have carried forward when I >> grabbed >> an instance of TriggerMessage. >

Re: [Tutor] problem with class - get message that self is not defined

2006-05-23 Thread Alan Gauld
>> self is a special varianble > "special variable" could be confusing. Python has no "special > variables". "self" is used by convention. Good point. The name self is not special it is its role that is special. thus class C: def m(s,p): print p c = C() c.m(42) Thus we define met