How to Set the Default Path in Python

 


  1. Open idle
  2. press Alt + M or File -> open Module
  3. type in idlelib.IOBinding
  4. the window opens, go to line 185 or depending on the version search for the variable dirname
  5. change either 'dirname = None' or 'filename = None' to the value you desire.

For example set:
dirname = '\\python35'

Reference:

http://stackoverflow.com/questions/15953303/how-to-change-default-directory-for-idle-in-windows