to the name of file containing your start-up commands this is similar to the profile feature of the unix shells this file is only read in interactive sessionsnot when python reads commands from scriptand not when /dev/tty is given as the explicit source of commands (which otherwise behaves like an interactive sessionit is executed in the same namespace where interactive commands are executedso that objects that it defines or imports can be used without qualification in the interactive session you can also change the prompts sys ps and sys ps in this file if you want to read an additional start-up file from the current directoryyou can program this in the global start-up file using code like if os path isfile(pythonrc py')exec(open(pythonrc py'read()if you want to use the startup file in scriptyou must do this explicitly in the scriptimport os filename os environ get('pythonstartup'if filename and os path isfile(filename)with open(filenameas fobjstartup_file fobj read(exec(startup_filethe customization modules python provides two hooks to let you customize itsitecustomize and usercustomize to see how it worksyou need first to find the location of your user site-packages directory start python and run this codeimport site site getusersitepackages('/home/userlocal/lib/python /site-packagesnow you can create file named usercustomize py in that directory and put anything you want in it it will affect every invocation of pythonunless it is started with the - option to disable the automatic import sitecustomize works in the same waybut is typically created by an administrator of the computer in the global site-packages directoryand is imported before usercustomize see the documentation of the site module for more details appendix