The best thing I've found is this:<br><br><a href="http://eli.thegreenplace.net/2009/05/29/storing-blobs-in-a-sqlite-db-with-pythonpysqlite/">http://eli.thegreenplace.net/2009/05/29/storing-blobs-in-a-sqlite-db-with-pythonpysqlite/</a><br>
<br><div class="gmail_quote">On Mon, May 17, 2010 at 5:05 PM, jon vs. python <span dir="ltr"><<a href="mailto:jonvspython@gmail.com">jonvspython@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi,<br>I'm trying to store frames received via serial port (using Pyserial) into a sqlite database (using Pysqlite) in order to perform off-line processing. Thus I could use both SQL's power and Python's magic to make everything easier. I'd like my code to be generic and work both for binary and ascii protocols, too.<br>
<br>Which kind of data should I use to store the frames?<br>Should I store every byte as a char in VARCHAR? (This seems to fail when trying to store non printable characters).<br>Should I encapsulate frames in buffer objects and store them in BLOBs? (This seems to work but hides content and thus doesn't allow to use database operations directly on the data)<br>
I've also tried, unsuccessfully, to use bytearrays with pysqlite...<br><br>Any suggestion?<br><br>Thanks, Jon.<br><div style="display: inline;"></div>
</blockquote></div><br><div style="visibility: hidden; display: inline;" id="avg_ls_inline_popup"></div><style type="text/css">#avg_ls_inline_popup { position:absolute; z-index:9999; padding: 0px 0px; margin-left: 0px; margin-top: 0px; width: 240px; overflow: hidden; word-wrap: break-word; color: black; font-size: 10px; text-align: left; line-height: 13px;}</style>