This code worked before:-
### PLATFORM USING ###
ostag = bpy.app.build_platform
if (ostag == ‘Linux:64bit’ or ostag == ‘Linux:32bit’):
dchr=’/’
if (ostag == ‘Windows:64bit’ or ostag == ‘Windows:32bit’):
dchr=’\’
### PLATFORM USING ###
### DIRECTORY ###
curdir = bpy.data.filepath.rsplit(dchr,1)[0] +dchr <<<< error line!
print(curdir)
Why has this stopped working in the latest version of Blender or Python?