No, but you can simulate it by typing this at the first prompt:
(This assumes the ".python" file is in the current directory.)
The Python interpreter does not automatically read a file of commands
because Python scripts should be independent of their environment, as
much as possible ($PYTHONPATH being the exception).
But if enough people want this, it's easy to add a feature whereby a
command line option (e.g. -f file) specifies a filename to be executed
before reading commands from stdin, or whereby an environment variable
(e.g. $PYTHONSTARTUP) specifies a file that is read by every
Or are there any better ideas?
--Guido van Rossum, CWI, Amsterdam <firstname.lastname@example.org>
"It's not much of a cheese shop really, is it?"