Human: How to properly determine current script directory in Python? Assistant: 
Here is some code to get current script directory

os.path.dirname(os.path.abspath(__file__))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.