Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python-Fu - os.path not working
#3
(01-11-2024, 08:47 AM)Ofnuts Wrote: 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...)

Man, I figured it was something silly, but I didn’t realize it was that silly. Thanks for the help!
Modder/Skinner at MarvelMods.com using GIMP to create, edit, and export textures and previews more efficiently.

My GIMP scripts hosted on GitHub
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 BaconWizard17 - 01-14-2024, 04:49 PM
RE: Python-Fu - os.path not working - by Ofnuts - 01-15-2024, 10:03 PM

Forum Jump: