include a python class in another python script.

2006-08-15 Thread KraftDiner
I have a class that is defined in a file called MyClass.py How do I use that class in another python script.. import MyClass ? (Does it need to be in a specific location?) -- http://mail.python.org/mailman/listinfo/python-list

Re: include a python class in another python script.

2006-08-15 Thread [EMAIL PROTECTED]
KraftDiner wrote: I have a class that is defined in a file called MyClass.py How do I use that class in another python script.. import MyClass ? (Does it need to be in a specific location?) Same directory as the script that's importing it, or in the PYTHONPATH. import sys print sys.path --

Re: include a python class in another python script.

2006-08-15 Thread danielx
KraftDiner wrote: I have a class that is defined in a file called MyClass.py How do I use that class in another python script.. import MyClass ? (Does it need to be in a specific location?) MyClass.py has to be on your python path. Your python path is a list of directories python will