On 11/08/2018 at 08:27, xxxxxxxx wrote:
Hi
I'm just learning python for Cinema 4d and have a really beginner question.
How do I import a helper class from another file?
----- Helper.py ---------------
class Helpers(object) :
def \__init\_\_(self, arg) :
super(Helpers, self).\__init\_\_()
@staticmethod
def myFunction() :
print("My helper function")
---- Main script.py -------------
import c4d
import Helpers
def main() :
Helpers.myFunction()
if \__name\_\_=='\__main\_\_':
main()
When I try this, I get an error "ImportError: No module named Helpers"
What am I doing wrong?