Re: [Tutor] validation

2007-08-28 Thread Michael
Thanks Everybody I now have several methods in my arsenal and they all look quite simple, now that I know. Just wondering, when would you use isInstance()? Thanks Alan Gauld wrote: > "Michael" <[EMAIL PROTECTED]> wrote > > >> to check and make sure that an integer is entered and the program

Re: [Tutor] Filemaker interactions

2007-08-28 Thread Ian Witham
Hello, I thought I'd update on my Filemaker Pro 6 situation. The PyFileMaker module (CGI based access) is meeting my requirements at present, although record searches with a large number of results are a little slow. If my project grows much larger in scope I will certainly look into the mxODBC

[Tutor] Shared Class Attribute

2007-08-28 Thread Ricardo Aráoz
Hi, if I have this class : class myClass : ClassCount = 0 def __init__(self) : (here I want to increment ClassCount for the whole class) self.InstanceAttr = 1 How would I increment the shared class attribute (ClassCount) from INSIDE the class? I can do it from the outside

Re: [Tutor] Shared Class Attribute

2007-08-28 Thread Eric Brunson
Ricardo Aráoz wrote: > Hi, > Hi Ricardo, In the future, please start a new thread with a new email and not a reply to an existing thread. Compliant mail clients thread based on headers you may or may not see in your client, and this email is part of the thread you replied to called "[Tutor

Re: [Tutor] validation

2007-08-28 Thread Terry Carroll
On Tue, 28 Aug 2007, Michael wrote: > I now have several methods in my arsenal and they all look quite simple, > now that I know. Just wondering, when would you use isInstance()? Well, as this thread has shown, I'm no expert, but let me take a stab on it. If nothing else, we'll all learn somet

Re: [Tutor] Shared Class Attribute

2007-08-28 Thread Ricardo Aráoz
Eric Brunson wrote: > Ricardo Aráoz wrote: >> Hi, >> > > Hi Ricardo, > > In the future, please start a new thread with a new email and not a > reply to an existing thread. Compliant mail clients thread based on > headers you may or may not see in your client, and this email is part of > th

Re: [Tutor] Shared Class Attribute

2007-08-28 Thread Eric Brunson
Ricardo Aráoz wrote: > Eric Brunson wrote: > >> Ricardo Aráoz wrote: >> >>> Hi, >>> >>> >> Hi Ricardo, >> >> In the future, please start a new thread with a new email and not a >> reply to an existing thread. Compliant mail clients thread based on >> headers you may or may not

Re: [Tutor] validation

2007-08-28 Thread Kent Johnson
Terry Carroll wrote: > 1A) a variation of option 1 (which is why I said "depending on how you > count" above): duck-typing with error recovery. > > def incr(n): > "returns an incremented value of n, or None if n is not incrementable" > try: > return n + 1 > except: > return None >

Re: [Tutor] validation

2007-08-28 Thread Terry Carroll
On Tue, 28 Aug 2007, Kent Johnson wrote: > Terry Carroll wrote: > > > 1A) a variation of option 1 (which is why I said "depending on how you > > count" above): duck-typing with error recovery. > > > > def incr(n): > > "returns an incremented value of n, or None if n is not incrementable" > >

[Tutor] A replacement for a "for" loop

2007-08-28 Thread Trey Keown
Hello everybody. I'm using a couple of "for" loops to help me in xml parsing using expat. Unfortunately, though, I've found that using more than one of these in a row, at least in my case, causes a redundancy error. a snippet of my code (note that this is not the way I set the dictionaries)- attrs

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

2007-08-28 Thread John Fouhy
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 "for" tag causes the dictionary (att

[Tutor] Newbie

2007-08-28 Thread Toby Holland
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 heard some great things about Python so any suggestions would

Re: [Tutor] Newbie

2007-08-28 Thread Scott
Toby Holland wrote: > 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 heard some great things about Python so

Re: [Tutor] Newbie

2007-08-28 Thread Lutz Horn
Hi, On Tue, 28 Aug 2007 22:25:11 -0400, "Toby Holland" <[EMAIL PROTECTED]> said: > 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. Take a look at: * "Byte of Python"