Python Forum

Full Version: Class File
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I have saved my 'class xyz' as abc.py at some location.

now I have another editor window in which I want to write a code to create an object of 'xyz'.

Please help.

Many thanks in advance.
import abc
x = abc.xyz()
abc.py either needs to be in the same folder as this code, or it needs to be in your pythonpath.