import inspect
  
# This is the most robust way of getting the full path to the 
# parent directory that contains a python script. This code
# works if the script is run from Cutter or from a terminal or
# Windows CMD window.
scriptpath = inspect.getframeinfo(inspect.currentframe()).filename
parent_dir = os.path.dirname(os.path.abspath(scriptpath))
print(parent_dir)