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'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"><<a href="mailto:ctb@msu.edu">ctb@msu.edu</a>></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>
> So first dbsqlite.py is using the *.db arg you specify when going to run<br>
> (opens it according to code... )....<br>
><br>
> Then it passes the shelve file to IntDictWrapper and we get the<br>
> following....<br>
> IntDictWrapper object at 0x101e0f350<br>
><br>
> IntDictWrapper.....I am only going by name but is it Initializing stuff for<br>
> the sending of data in dictionaries?<br>
<br>
</div>Yep: 'shelve' modules need string keys, so IntDictWrapper just wraps<br>
integer keys => string keys.<br>
<div class="im"><br>
> So after IntDictWrapper call, dbsqlite.py shows the dbfile as catalog.sqlite<br>
><br>
> All I can tell from the catalog is it holds the 'MAKE_SHELF' Line 34 in<br>
> dbsqlite.<br>
<br>
</div>catalog?<br>
<div class="im"><br>
> Then what the Coordinator is using finally for dbfile arg is IncDictWrapper<br>
> object 0x101e0f350<br>
><br>
> Can you explain any of those step in server startup a bit more?<br>
><br>
> When ever i see 0xjibberish I always figure memory address......<br>
<br>
</div>;) Just means it'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 'shelve'-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, 'dbfilename' gets passed straight into the sqlite connect function -- you<br>
should be able to use 'print' 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>