Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread Jeff Tchang
> Random related question. If you're writing a SAML implementation have > you found an XML Signature implementation that works reliably from > python? I've had a hell of a time finding something that doesn't > segfault and is interoperable with .NET. I guess you could call it a SAML implementation

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread John Krukoff
On Tue, 2008-11-18 at 10:45 -0800, Jeff Tchang wrote: > Odd issue I am having with class instantiation on Python 2.5.2 (Windows). > > I have a custom module with a few classes in it. The module is named SAML.py. > There is a copy of it in C:\Python25\Lib\site-packages\SAML.py. > > Basically when

Re: Class instantiation fails when passed in a file but work via line by line interpreter

2008-11-18 Thread Steve Holden
Jeff Tchang wrote: > Odd issue I am having with class instantiation on Python 2.5.2 (Windows). > > I have a custom module with a few classes in it. The module is named SAML.py. > There is a copy of it in C:\Python25\Lib\site-packages\SAML.py. > > Basically when I try to run a python file that tri

Re: Class instantiation

2006-08-23 Thread Colin J. Williams
Fredrik Lundh wrote: > Colin J. Williams wrote: > >> In the example below, with the disassembly following that, we run into >> trouble with the line: >> self.connect(fileID, mode= 'r') # open sheet in the read mode >> >> the traceback is: >> Traceback (most recent call last): >>File

Re: Class instantiation

2006-08-23 Thread Fredrik Lundh
Colin J. Williams wrote: > In the example below, with the disassembly following that, we run into > trouble with the line: > self.connect(fileID, mode= 'r') # open sheet in the read mode > > the traceback is: > Traceback (most recent call last): >File "C:\Documents and Settings\cjw

Re: Class instantiation

2006-08-23 Thread Paul McNett
Colin J. Williams wrote: > class arSpread(object): >def __init__(self, fileId= None, ar= None): > if fileId: >if ar is not None: > print fileId > self.connect(fileID, mode= 'r') # open sheet in the read mode >else: > self.connect(fileID, mod

Re: Class instantiation

2006-08-23 Thread Gabriel Genellina
At Wednesday 23/8/2006 16:21, Colin J. Williams wrote: In the example below, with the disassembly following that, we run into trouble with the line: NameError: global name 'fileID' is not defined At line 26, location 31, why is LOAD_GLOBAL generated for fileId, when LOAD_FAST has done the job a