Hello all,

Using Python3 I would like to import a specific class from another file (in 
the same folder), and have trouble doing so.

"from file import function" works, but fails when I try to do the same with 
a class.

"import file
x = file.class"

works, but also executes commands that are in the root of the file. And 
ofcourse loads all of the file, not just the class that I'm after ...

In other words, what is the syntaxt I should use ?

Regards,
Rudy Wieser


-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to