Class instantiation fails when passed in a file but work via line byline interpreter

J

Jeff Tchang

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 tries to create an
instance of the class Subject I get this error:
AttributeError: type object 'SAML' has no attribute 'Subject'

In SAML.py I have the class...

class Subject(object):
...
...
etc

However, when I run the same line by line by starting up python it works.
I've double checked I am loading the correct module by the usage of the -v flag.
What else should I be checking?

-Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,905
Latest member
Kristy_Poole

Latest Threads

Top