Hmmm well, seems that doing a test in run.py to see if a dbfile was specified or not and passing that or :memory: may work?<br><br>Seems too easy to be true.....I have it hard coded right now to just use :memory: and it seems to be working. I see no files created like when we use something.db.<br>
<br>How would we go about testing it?<br><br>It doesn&#39;t change any output or create any output, you just pass :memory: and that is it, sqlite takes care of everything in the back ground.<br><br>Would it be possible to do something where we create in-memory db, then do a memory purge then see if its gone or not? Not sure it can be easily tested.<br>
<br>Max<br><br><div class="gmail_quote">On Sun, Mar 28, 2010 at 4:43 PM, C. Titus Brown <span dir="ltr">&lt;<a href="mailto:ctb@msu.edu">ctb@msu.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Sun, Mar 28, 2010 at 04:36:06PM -0400, Max Laite wrote:<br>
&gt; So first dbsqlite.py is using the *.db arg you specify when going to run<br>
&gt; (opens it according to code... )....<br>
&gt;<br>
&gt; Then it passes the shelve file to IntDictWrapper and we get the<br>
&gt; following....<br>
&gt; IntDictWrapper object at 0x101e0f350<br>
&gt;<br>
&gt; IntDictWrapper.....I am only going by name but is it Initializing stuff for<br>
&gt; the sending of data in dictionaries?<br>
<br>
</div>Yep: &#39;shelve&#39; modules need string keys, so IntDictWrapper just wraps<br>
integer keys =&gt; string keys.<br>
<div class="im"><br>
&gt; So after IntDictWrapper call, dbsqlite.py shows the dbfile as catalog.sqlite<br>
&gt;<br>
&gt; All I can tell from the catalog is it holds the &#39;MAKE_SHELF&#39; Line 34 in<br>
&gt; dbsqlite.<br>
<br>
</div>catalog?<br>
<div class="im"><br>
&gt; Then what the Coordinator is using finally for dbfile arg is IncDictWrapper<br>
&gt; object 0x101e0f350<br>
&gt;<br>
&gt; Can you explain any of those step in server startup a bit more?<br>
&gt;<br>
&gt; When ever i see 0xjibberish I always figure memory address......<br>
<br>
</div>;) Just means it&#39;s a not nicely configured Python object.<br>
<br>
So, on the server side, pony_build/web/__init__.py lines 481 and 482<br>
take the dbfilename and build a &#39;shelve&#39;-like dictionary (tied to a<br>
sqlite database) wrapped in an IntDictWrapper:<br>
<br>
   <a href="http://docs.python.org/library/shelve.html" target="_blank">http://docs.python.org/library/shelve.html</a><br>
<br>
Here, &#39;dbfilename&#39; gets passed straight into the sqlite connect function -- you<br>
should be able to use &#39;print&#39; in dbsqlite.py to verify that.<br>
<br>
Is that any help?<br>
<br>
cheers,<br>
<font color="#888888">--titus<br>
</font></blockquote></div><br>