Are there any common timesavers that people put in Python Interactive Startup scripts? I made a dopey one to help me know where I am when I try to do relative file operations or import
s, using a win32 module to change the name of the console window.
import sys
import os
import win32api
__title_prefix = 'Python %i.%i.%i %s %s' % (sys.version_info[0:4] +
(sys.version_info[4] or "",))
def __my_chdir(path):
__os_chdir(path)
win32api.SetConsoleTitle(__title_prefix + " - " + os.getcwd())
# replace chdir func
__os_chdir = os.chdir
os.chdir = __my_chdir
os.chdir(r'C:\Scripts')