How to preload some libraries and scripts in python before I call python command? Is there something like .bashrc file to deal with predefining some functions/variables befo
Create a file, 'my_imports.py' and add the import lines for all your modules.
import math
import anothermodule
import anotherothermodule
Then set an environment variable 'PYTHONSTARTUP' and set it to '/path/to/my_imports.py'.
Now when you run python at the command prompt, it will load your modules first.