When trying to import and run my own module I am getting NameError

   1206   2   0
User Avatar
Member
26 posts
Joined: 7月 2015
Offline
When I try and import my module and run it ‘hou.’ is returning a NameError

NameError: global name ‘hou’ is not defined


    #myImportModule.py
    def Run():
	hou.parm('/obj/myObj').set(3)

As far as I know hou is in the global namespace. But I am lost why it's not.
User Avatar
Member
2538 posts
Joined: 6月 2008
Offline
Just import hou. You only get .hou for “free” inside the shell because it is imported by default by the developers.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
2538 posts
Joined: 6月 2008
Offline
Just import hou. You only get .hou for “free” inside the shell because it is imported by default by the developers.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links