Random Python Snippets

date: 2020-11-09
author: Peterino

Automation Scripts and stuff

This contains some random pythyon snippets i keep forgetting but keep using.

import os 
orig_dir = os.path.dirname(__file__)
os.chdir(orig_dir)
// now you can os.system like its in the ksame folder

Removing stuff

shutil.rmtree(muh_folder) # hits harder than rmdir