Drughi Posted January 5, 2021 Share Posted January 5, 2021 (edited) Hi, I'm updating my python scripts, but it behaves weird when importing with python3. I got a python3.7libs folder in my HOUDINI_PATH. Inside there is my lets say "tools" folder containing "__init__.py" and "test.py". In "test.py" there is a test function hello_world. If I now "import tools" I would expect to be able to call test.py by "tools.test" , wich is not working ("tools has no attribute test"). Only if I do "from tools import test" it works. Also if there is another python file in the folder called "utils.py" I'm not able to "import utils" in test.py. What am I doing wrong? Edit: My bad. I need to "import test from tools" Edited January 5, 2021 by Drughi 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.