Propietary binary serial port protocols

2010-04-26 Thread jon vs. python
Hi,
I'm working in several helper tools to parse, simulate, etc. propietary
binary serial port protocols. I'm trying to find out which is the best
internal data representation. Bytearrays seem to be the best choice, but I'd
like some feedback from more experienced developers; because I took a look
to scapy's source code and didn't see any of those...
Thanks, Jon.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: pysms

2010-05-06 Thread jon vs. python
Hi Luca,
I've never used pysms, but I just downloaded the source code and it seems
that SMS related functionallity is performed using standard GSM AT commands.
So if you're accessing the gsm module through a serial port you shouldn't
worry at all.
Hope it helps, Jon.

On Thu, May 6, 2010 at 9:40 AM, luca72  wrote:

> Hello
> Has anyone used pysms can you tell me with wich gsm module it works?
>
> Thanks
>
> Luca
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Pyserial and pysqlite data types, need advice

2010-05-17 Thread jon vs. python
Hi,
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.

Which kind of data should I use to store the frames?
Should I store every byte as a char in VARCHAR? (This seems to fail when
trying to store non printable characters).
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)
I've also tried, unsuccessfully, to use bytearrays with pysqlite...

Any suggestion?

Thanks, Jon.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Pyserial and pysqlite data types, need advice

2010-05-18 Thread jon vs. python
The best thing I've found is this:

http://eli.thegreenplace.net/2009/05/29/storing-blobs-in-a-sqlite-db-with-pythonpysqlite/

On Mon, May 17, 2010 at 5:05 PM, jon vs. python wrote:

> Hi,
> 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.
>
> Which kind of data should I use to store the frames?
> Should I store every byte as a char in VARCHAR? (This seems to fail when
> trying to store non printable characters).
> 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)
> I've also tried, unsuccessfully, to use bytearrays with pysqlite...
>
> Any suggestion?
>
> Thanks, Jon.
>
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Function/method returning list of chars in string?

2009-06-09 Thread jon vs. python
Sorry, I didn't realize that you already proposed list comprehension.
There is some kind of asymmetry in several areas.I guess that's somehow
related to this post:  http://www.zedshaw.com/blog/2009-05-29.html

-- 
http://mail.python.org/mailman/listinfo/python-list