This is an update to the question below, because I've discovered the same thing happens when I start bokeh_server in a directory containing any script named code.py.
I have a directory, /Users/xnx/temp/ containing many (mostly disposable) files including various scripts. When I start IPython from the command within my Anaconda py33 virtual environment, it seems to run one of these scripts before dropping me into the IPython shell, because I get a list of the numbers and their cubes output to the screen before IPython shows its prompt:
Xnx-Mac:temp xnx$ py33
discarding /Users/xnx/anaconda/bin from PATH
prepending /Users/xnx/anaconda/envs/py33/bin to PATH
(py33)Xnx-Mac:temp xnx$ ipython
0
0
1
1
2
8
...
99
970299
Python 3.3.5 |Anaconda 2.0.1 (x86_64)| (default, Sep 2 2014, 13:57:31)
Type "copyright", "credits" or "license" for more information.
IPython 2.3.0 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]:
(py33 is just a bash alias for source activate py33).
This doesn't seem to be causing any harm, but I'd like to know why it's happening. Any ideas?
EDIT: OK: the offending script is a file called code.py in my /Users/xnx/temp/ directory. Why is IPython executing this file before starting its shell? What if it had contained commands deleting files from my system? Can anyone else reproduce this? It doesn't seem to happen for Python 2.
PYTHON_STARTUP(I think) ... printenvright before you start ipython