Python Forum
Class File - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Class File (/thread-4773.html)



Class File - ankur2207 - Sep-07-2017

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.


RE: Class File - ichabod801 - Sep-07-2017

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.