Mar-03-2023, 11:12 AM
Hello together,
i just finished my first own package but facing a problem when importing and executing things from outside:
I made a very minimal example as demonstration:
Folder "mymodule" contains:
Question: Why is that? ( Maybe this code should that never be necessary - let me know anything you have in mind :)
Thank you very much,
Bock
PS: how can i make a "tab" in the python brackets of the thread editor?
i just finished my first own package but facing a problem when importing and executing things from outside:
I made a very minimal example as demonstration:
Folder "mymodule" contains:
#__init__.py # empty #constants.py my_const = 42 #function.py def my_func(): print(my_const)On the same level as mymodule is :
# test.py from mymodule.function import my_func my_func()Unfortunately i get the error message: "no module named 'constant' " which confuses me since i can import constant in function.py properly.
Question: Why is that? ( Maybe this code should that never be necessary - let me know anything you have in mind :)
Thank you very much,
Bock
PS: how can i make a "tab" in the python brackets of the thread editor?