Hello I'm writing a small script which will make a webbsite template for me. I'm going to make an alias which would run the script and thats why I have a problem. When running the script, I don't want to write a directory to where I want to create my folder. I want it to create in my terminals working directory. How do I "os.chdir()" to my terminals working directory. I have tried:
import os
dir_path = os.system("pwd | clip")
os.chdir(dir_path)
Output:
TypeError: chdir: path should be string, bytes or os.PathLike, not int
TL,DR I want to get the path from where in terminal the script executes and then os.chdir() to it