Hypnos, did you mean to tell me that panda_function_lib_dir and currect_project_dir are at the same level ?
I tried it by copying /actor from P3D/direct/src to the parent directory of the test scene’s dir, and import it :
from actor import Actor # /actor is copied from P3D/direct/src
Python can’t find it unless I added the parent dir to the path (in the main test file) :
sys.path.append(os.pardir)
So, normally how do you do it ?
If you added the parent dir yourself, then it will always be found, no matter what the IDE is doing.
UPDATE :
- fixed all wxPython issues on Linux. File dialog is not spawned in a new thread, since it’s a complicated widget, and tends to crash.
- added auto-indent for these keywords : class, def, if, else, elif, try, except, finally, for, while
- fixed the scrambled sort order of nodes when using separate render bin. Using back-to-front type bin used to work in 1.5.1, but in 1.5.2, using unsorted bin does it correctly.
- improved runtime task-spawn error-tracing, something used to end up this way :
Traceback (most recent call last):
File "IDE.py", line 3027, in IDE_safeRun
taskMgr.run()
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 939, in run
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 877, in step
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 776, in __stepThroughList
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 696, in __executeTask
TypeError: changeColor() takes exactly 1 argument (2 given)
i.e. due to incorrect arguments count.
The IDE now can locate the exact error position, unless you change the method and/or the class’ name, before it actually run.
Shots of it, see the difference if I change self.changeColor to changeColor ?
funny news :
How could Python spit Windows path on Linux ?
Look at the last path :
Traceback (most recent call last):
File "IDE.py", line 3018, in IDE_safeRun
taskMgr.run()
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 939, in run
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 877, in step
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 776, in __stepThroughList
File "linuxroot/usr/share/panda3d/direct/src/task/Task.py", line 696, in __executeTask
File "I:\PROGRAMMING\Panda3D\=coba IDE\jackClass.py", line 21, in changeColor
NameError: global name 'Task' is not defined
I’ve covered that too.