<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix"><a class="moz-txt-link-freetext" href="http://github.com/gvwilson/sqlitemagic">http://github.com/gvwilson/sqlitemagic</a>
      may also be of interest - it's what we use to produce the Software
      Carpentry lesson on SQL.<br>
      thx,<br>
      G<br>
      <br>
      On 2014-05-05 1:55 PM, Martin Gadbois wrote:<br>
    </div>
    <blockquote
cite="mid:CAN1QFFQZLS3EXhcNNVHQARFAB9eGBPjbN0zYWWE5HMaNwfsSxA@mail.gmail.com"
      type="cite">
      <div dir="ltr">Wow that was there but not found by Google... nice!
        I will take a close look, thanks!<br>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Mon, May 5, 2014 at 11:52 AM,
          Jessica B. Hamrick <span dir="ltr"><<a
              moz-do-not-send="true" href="mailto:jhamrick@berkeley.edu"
              target="_blank">jhamrick@berkeley.edu</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">Hi all,
              <div><br>
              </div>
              <div>I jut wanted to throw out there a link to the SQL
                magic, which may be relevant:</div>
              <div><br>
              </div>
              <div><a moz-do-not-send="true"
                  href="https://github.com/catherinedevlin/ipython-sql"
                  target="_blank">https://github.com/catherinedevlin/ipython-sql</a><br>
              </div>
              <div><br>
              </div>
              <div>I know it's not a whole kernel, but may be a good
                starting place for at least seeing what other people
                have been thinking about along the same directions.</div>
              <div class="gmail_extra"><br>
              </div>
              <div class="gmail_extra">Cheers,<br clear="all">
                <div>
                  <div dir="ltr">Jess
                    <div><br>
                    </div>
                    <div>--<br>
                      UC Berkeley, Department of Psychology
                      <div>Computational Cognitive Science Lab
                        <div><a moz-do-not-send="true"
                            href="http://www.jesshamrick.com/"
                            target="_blank">http://www.jesshamrick.com</a></div>
                      </div>
                    </div>
                  </div>
                </div>
                <div>
                  <div class="h5">
                    <br>
                    <br>
                    <div class="gmail_quote">On Mon, May 5, 2014 at 8:28
                      AM, Doug Blank <span dir="ltr"><<a
                          moz-do-not-send="true"
                          href="mailto:doug.blank@gmail.com"
                          target="_blank">doug.blank@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="gmail_extra">
                            <div class="gmail_quote">
                              <div>On Mon, May 5, 2014 at 11:00 AM,
                                Martin Gadbois <span dir="ltr"><<a
                                    moz-do-not-send="true"
                                    href="mailto:mgadbois@gmail.com"
                                    target="_blank">mgadbois@gmail.com</a>></span>
                                wrote:<br>
                                <blockquote class="gmail_quote"
                                  style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                  <div dir="ltr">
                                    <div>Hi!<br>
                                      <br>
                                    </div>
                                    I would like to develop a SQLite
                                    kernel for IPython.<br>
                                    <br>
                                    Keyword, table and column completion
                                    would help building queries, and a
                                    dynamic output could resize text
                                    columns and have a proper notebook
                                    table output.<br>
                                    <br clear="all">
                                    <div>
                                      <div>To achieve that, I see two
                                        main directions:<br>
                                      </div>
                                      <div>1- Have an external kernel 
                                        (like <a moz-do-not-send="true"
href="http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb"
                                          target="_blank">http://nbviewer.ipython.org/gist/Carreau/4279371/node-kernel.ipynb</a>)
                                        coded in Python since there are
                                        no 0MQ bindings for SQLite.<br>
                                      </div>
                                      <div>2- Extend IPython itself to
                                        support SQLite, since I will
                                        need to write Python code anyway
                                        to support SQLite.<br>
                                      </div>
                                    </div>
                                  </div>
                                </blockquote>
                                <div><br>
                                </div>
                              </div>
                              <div>I've wanted something like this for a
                                while! I would like to incorporate SQL
                                as a language that could easily be used
                                in a variety of educational settings and
                                other open source projects. But the
                                utility of such a project lies in the
                                details of implementation.</div>
                              <div><br>
                              </div>
                              <div>There are pros and cons to both
                                approaches. But you could perhaps
                                develop it in a manner that could be
                                used in either situation. What would
                                generally be useful would be to
                                replicate the SQLite shell. It would be
                                great if the parser was written in pure
                                Python, and had an interpreter, also as
                                much written in pure Python as possible.
                                That is, it would be great if the
                                low-level C-based sqlite API was
                                limited, and could be swapped out. </div>
                              <div><br>
                              </div>
                              <div>That would allow other
                                implementations of Python (Jython, PyPy,
                                IronPython) could use it with their own
                                sqlite wrappers. But also, that might
                                make it useful for interfacing other
                                data storages (for example, CSV files,
                                Django databases, etc.) </div>
                              <div><br>
                              </div>
                              <div>The SQLite shell is actually a bit
                                hairy. Here is a port of the C code to
                                C# for example:</div>
                              <div><br>
                              </div>
                              <div><a moz-do-not-send="true"
                                  href="http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell"
                                  target="_blank">http://stackoverflow.com/questions/12620673/net-sqlite-sql-shell</a><br>
                              </div>
                              <div><br>
                              </div>
                              <div>You could also use the simple-kernel
                                [1] as a way of quickly turning a Python
                                program into a kernel. (simple-kernel
                                was just updated by Min, so now it is
                                correct; thanks, Min!)</div>
                              <div><br>
                              </div>
                              <div>This might also have connections to
                                the ADODB API [2]... they have worked
                                hard to make their connections be
                                Python-implementation agnostic.</div>
                              <div><br>
                              </div>
                              <div>Looking forward to see what you
                                develop!</div>
                              <div><br>
                              </div>
                              <div>-Doug</div>
                              <div><br>
                              </div>
                              <div>[1] <a moz-do-not-send="true"
                                  href="https://github.com/dsblank/simple_kernel"
                                  target="_blank">https://github.com/dsblank/simple_kernel</a></div>
                              <div>[2] <a moz-do-not-send="true"
                                  href="https://sourceforge.net/projects/adodbapi"
style="font-size:12.800000190734863px;font-family:arial,sans-serif"
                                  target="_blank">https://sourceforge.net/projects/<span>adodbapi</span></a></div>
                              <div>
                                 </div>
                              <blockquote class="gmail_quote"
                                style="margin:0px 0px 0px
0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
                                <div>
                                  <div dir="ltr">
                                    <div>
                                      <div><br>
                                      </div>
                                      <div>What would this list
                                        recommend as an implementation
                                        strategy?<br>
                                      </div>
                                      <div>Any example of creating an
                                        external kernel by reusing a
                                        subset of IPython itself?<br>
                                        <br>
                                      </div>
                                      <div>Thanks!<span><font
                                            color="#888888"><br>
                                          </font></span></div>
                                      <span><font color="#888888">
                                          <div><br>
                                          </div>
                                          <div>-- <br>
                                            Martin
                                          </div>
                                        </font></span></div>
                                  </div>
                                  <br>
                                </div>
_______________________________________________<br>
                                IPython-dev mailing list<br>
                                <a moz-do-not-send="true"
                                  href="mailto:IPython-dev@scipy.org"
                                  target="_blank">IPython-dev@scipy.org</a><br>
                                <a moz-do-not-send="true"
                                  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>
                        </div>
                        <br>
                        _______________________________________________<br>
                        IPython-dev mailing list<br>
                        <a moz-do-not-send="true"
                          href="mailto:IPython-dev@scipy.org"
                          target="_blank">IPython-dev@scipy.org</a><br>
                        <a moz-do-not-send="true"
                          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>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            IPython-dev mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
            <a moz-do-not-send="true"
              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>
        <br clear="all">
        <br>
        -- <br>
        Martin
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
IPython-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a>
<a class="moz-txt-link-freetext" href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>