Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Fu - mkdir not working
#3
At a guess I'd suggest the thing that's breaking is this line:
filePathSplit = filePath.split("/")

Because pdb.gimp_image_get_filename(image) is going to return a filepath in Windows format because you're runing GIMP on Windows. i.e.

C:\Users\ethan\Desktop\Test.xcf

You should probably use os.path.dirname(path) to get the directory name: https://docs.python.org/2/library/os.path.html
Reply


Messages In This Thread
Python Fu - mkdir not working - by BaconWizard17 - 01-27-2023, 03:52 AM
RE: Python Fu - mkdir not working - by gasMask - 01-27-2023, 07:50 AM
RE: Python Fu - mkdir not working - by Kevin - 01-27-2023, 09:17 AM
RE: Python Fu - mkdir not working - by Ofnuts - 01-27-2023, 10:06 AM
RE: Python Fu - mkdir not working - by Kevin - 01-31-2023, 10:12 AM

Forum Jump: