is there a way in 2.74 to read a file in local folder where the data file is located ?
this was working in 2.72 but now fail !
Ex:
filein = “[zcolor](file://\zcolor)1”
sourceName = filein + ‘.py’
fo = open(sourceName, “r”)
thanks
happy bl
is there a way in 2.74 to read a file in local folder where the data file is located ?
this was working in 2.72 but now fail !
Ex:
filein = “[zcolor](file://\zcolor)1”
sourceName = filein + ‘.py’
fo = open(sourceName, “r”)
thanks
happy bl
Don’t know what causes the change, but as the python zen says… “Explicit is better than implicit”.
So in this case:
filepath = bpy.path.abspath("//zcolor1.py")
have not seen that one !
but will test it!
but not certain what changes happened on the relative mode
cause it was working fine in 2.72
or use the OS module !
thanks
looks like
filepath = bpy.path.abspath("//zcolor1.py")
work well !
but still wondering why the old way does not work anymore!
thanks
happy bl