Python3 - How do I import a class from another file

R.Wieser address at not.available
Sun Dec 8 12:28:21 EST 2019


Chris,

> Are you sure there's a difference between classes and functions here?

Yes, quite sure.

If not my attempt to load a class he same way as a function would have 
worked.  Which it doesn't.

> Try "from file import function" and see if it runs commands at
> the root of the file.

What function ?   The imported file doesn't contain any.

Regards,
Rudy Wieser




More information about the Python-list mailing list