Run Python Code Automatically Log