I was experiencing strange errors from %load_ext rmagic, which IPython reported coming from this code:
/Library/Frameworks/EPD64.framework/Versions/7.3/lib/python2.7/site-packages/rpy2/rinterface/__init__.py in <module>()
16 except KeyError:
17 tmp = os.popen("R RHOME")
---> 18 R_HOME = tmp.readlines()
The fix was a simple removal of the old conf, and creation of a new on using ipython profile create.
I'm not sure exactly what the problem is, so I include all non-commented lines of my (pretty vanilla) legacy ipy_user_conf.py:
22 : ip = IPython.ipapi.get()
55 : o.system_verbose = 0
71 : o.autoexec.append('%colors LightBG')
105 : def import_all(modules):
106 : """ Usage: import_all("os sys") """
107 : for m in modules.split():
108 : ip.ex("from %s import *" % m)
111 : """ Execute a file in user namespace """
112 : ip.ex('execfile("%s")' % os.path.expanduser(fname))
Can someone with R magic experience explain how this makes any sense?
Before figuring out if it makes sense, can someone see if they can replicate it? Steps to replicate are simply copying the ipy_user_conf.py into (I think) your .ipython directory. I'm guessing it's the presence of the file triggering some different initialization.
I can't reproduce it. That file is completely ignored by IPython ≥ 0.11, except to show a warning that it was ignored.
Sounds like gremlins then. I'll close this. If someone else can reproduce it, then re-open!