Python Automatic Detect The Path