what's wrong with os.path.join?

From the manual:

What’s wrong with using os.path.join? My guess is that either A) this is something from the low-level C++ or B) using os.path.join() is tedious for interactive work. I’d be curious to know what the actual reasons for it are.

I think this is my last “why?” question for now :slight_smile:

The answer is both of the above. Remember, Panda3D is not written strictly for Python, but is actually a C++ library in its own right. So it needs its own mechanism for accessing paths, independent of Python’s system.

But it is also true that os.path.join() is kind of tedious to use in practice. Which would you rather say: loader.loadModel(os.path.join(‘models’, ‘misc’, ‘auto’, ‘myFile.bam’)), or loader.loadModel(‘models/misc/auto/myFile.bam’) ?

In practice, you can use both systems in the same application, whichever is more comfortable to you at the moment.


Ok, thanks. Does anyone still use the C++ library, or does everyone go through the panda bindings?

All the utility programs - pview, egg2bam, etc - these are all panda programs that are written in pure C++

  • Josh