<div dir="ltr">Sorry for the delay in responding to this.<div><br></div><div style>If I just put the zip file in a directory on sys.path, I can't import it.  I tried it both where the zip file contained the leading directory (so grasp/grasp.py and grasp/__init__.py) and also where the zip file just contained grasp.py and __init__.py at the top level.  </div>
<div style><br></div><div style>But if I put the zip file itself on the path via sys.path += ['blah/blah/grasp.zip'] then I can import grasp using either of the two zip file structures above.</div><div style><br></div>
<div style>Greg</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 3, 2013 at 2:36 PM, Thomas Kluyver <span dir="ltr"><<a href="mailto:takowl@gmail.com" target="_blank">takowl@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="im"><div class="gmail_extra"><div class="gmail_quote">On 3 April 2013 13:12, Greg Novak <span dir="ltr"><<a href="mailto:greg.novak@gmail.com" target="_blank">greg.novak@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>It does indeed put the file into .ipython/extensions, but then to use it I need to put the zip file in sys.path explicitly.  Just having the zip file in the extensions directory isn't enough.  So if I also do:</div>



<div><br></div><div>import sys</div><div>sys.path += ["/Users/novak/.ipython/extensions/grasp.zip"]</div></blockquote></div><br></div></div><div class="gmail_extra">Is the zip file itself importable? i.e. if you put the directory containing the zip file on your PYTHONPATH, can you do 'import grasp'? I think it needs to be structured so that the top level of the zip file contains an __init__.py file.<br>


<br></div><div class="gmail_extra">But it's fine to install using pip instead - it's a deliberate feature that an extension is simply any importable module with a load_ipython_extension() function at the top level. Sympy, for example, includes an IPython extension as part of its installation.<span class="HOEnZb"><font color="#888888"><br>


<br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">Thomas<br></div></font></span></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>