Startup File

Create a startup file

You can use a Python startup file to ensure that the see function is available every time you run Python. The following example uses a file named .pythonrc.py in the user’s home directory:

  1. Create the Python startup file, if it does not already exist:

    $ touch ~/.pythonrc.py
    
  2. Open this file in your preferred editor. Add the following line:

    from see import see
    
  3. Set the following environment variable:

    $ export PYTHONSTARTUP="$HOME/.pythonrc.py"
    

    For example, with the Bash shell, you can add this to the ~/.bashrc file.

Now you can use see immediately after running the Python interpreter, without having to manually import it.