Not sure if this is a cherrypy bug. It has only happened with cherrypy.
Basically do this:
Make a directory 'cherrypy'
Create an empty file cherrypy/init.py
Create a file cherrypy/test.py containing the following:
from cherrypy import expose
Running
ipython test.py
inside the cherrypy directory works fine. As does running python2 test.py
Running
python2 cherrypy/test.py
inside root directory works fine.
Running
ipython cherrypy/test.py
from the root directory results in:
ImportError Traceback (most recent call last)
/usr/lib/python2.7/site-packages/ipython-0.12-py2.7.egg/IPython/utils/py3compat.pyc in execfile(fname, *where)
173 else:
174 filename = fname
--> 175 builtin.execfile(filename, *where)
/home/canute/cherrypy/test.py in ()
----> 1 from cherrypy import expose
ImportError: cannot import name expose
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4