Re: [Tutor] Reading only a few specific lines of a file

2008-05-24 Thread Jason Conner
Hey guys, I went with a combination of the above, though I tried several different solutions. Here's what I ended up with: def loadItem(self, objectToLoad): wordList = [] fobj = open('/home/jason.conner/Documents/Python/objectconfig.txt', 'r') for line in fobj: if line == obj

Re: [Tutor] Decompyle and python 2.4 (2.5)

2008-05-24 Thread dnr
sadly I don't speak this language(java is my religion) - it will take weeks for me to dig into the code. Personaly I don't have an interest anymore in revealing what's behind the *.pyc curtains because I got what I wanted. Still, assuming the fact that 90% of work is allready done and there's so

Re: [Tutor] __getattr__ can't be a staticmethod?

2008-05-24 Thread Kent Johnson
On Sat, May 24, 2008 at 2:45 AM, inhahe <[EMAIL PROTECTED]> wrote: > On Fri, May 23, 2008 at 10:47 PM, Kent Johnson <[EMAIL PROTECTED]> wrote: >> On Fri, May 23, 2008 at 7:52 PM, inhahe <[EMAIL PROTECTED]> wrote: >>> why doesn't this work? >>> >> class a: >>> ... @staticmethod >>> ... def _

Re: [Tutor] Equivalent 'case' statement

2008-05-24 Thread Dinesh B Vadhia
The dictionary of functions was the way to go and does perform much faster than if/elif's. Thank-you! - Original Message - From: inhahe To: Dinesh B Vadhia Cc: tutor@python.org Sent: Thursday, May 22, 2008 4:15 PM Subject: Re: [Tutor] Equivalent 'case' statement no, but you can