Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python-Fu - os.path not working
#2
The function is dirname and not dirName (no camelcase N, done too much Java lately?)

If you had copy-pasted the code in the python-fu console, you would have found this very quickly:


➤> folderName = os.path.dirName(filePath)
Traceback (most recent call last):
 File "<input>", line 1, in <module>
AttributeError: 'module' object has no attribute 'dirName'


The method you point to in the Tutorials section to is not to be used in the python-fu console but in your code (it reroutes the stdOut and obviously the python-fu console needs it too...)
Reply


Messages In This Thread
RE: Python-Fu - os.path not working - by Ofnuts - 01-11-2024, 08:47 AM
RE: Python-Fu - os.path not working - by Ofnuts - 01-15-2024, 10:03 PM

Forum Jump: