The code below returns the path to the folder containing the running script document in Rhino7, which is what I expect. In Rhino8, it returns C:\Program Files\Rhino 8\System (my script is not in that folder).
Is it a bug? Is this just the new way going forward? Is there an alternate way to get the folder of the running script (or even the full path)?
#! python 2
import os
print(os.getcwd())
I generally need the python2 comment, but I get the same results with and without that comment.
small remark; if you call os.getcwd() from inside a module, it is expected to return the directory of the __main__ entry script. Your solution will return the module directory instead.