Re: Literal Escaped Octets

2006-02-08 Thread Chason Hayes
On Wed, 08 Feb 2006 00:57:45 -0500, Steve Holden wrote: > Chason Hayes wrote: >> On Tue, 07 Feb 2006 01:58:00 +, Steve Holden wrote: >> >> >>>Chason Hayes wrote: >>> On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote: >>> >>>[...] >>> >The URL you reference is discussing how you

Re: Literal Escaped Octets

2006-02-07 Thread Steve Holden
Chason Hayes wrote: > On Tue, 07 Feb 2006 01:58:00 +, Steve Holden wrote: > > >>Chason Hayes wrote: >> >>>On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote: >> >>[...] >> The URL you reference is discussing how you represent arbitrary values in string literals. If you already ha

Re: Literal Escaped Octets

2006-02-07 Thread Chason Hayes
On Tue, 07 Feb 2006 01:58:00 +, Steve Holden wrote: > Chason Hayes wrote: >> On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote: > [...] >>> >>>The URL you reference is discussing how you represent arbitrary values >>>in string literals. If you already have the data in a Python string the

Re: Literal Escaped Octets

2006-02-07 Thread Chason Hayes
On Tue, 07 Feb 2006 15:06:49 +, Bengt Richter wrote: > On Mon, 06 Feb 2006 04:40:31 GMT, Chason Hayes <[EMAIL PROTECTED]> wrote: > >>I am trying to convert raw binary data to data with escaped octets in >>order to store it in a bytea field on postgresql server. I could do this >>easily in c/c

Re: Literal Escaped Octets

2006-02-07 Thread Bengt Richter
On Mon, 06 Feb 2006 04:40:31 GMT, Chason Hayes <[EMAIL PROTECTED]> wrote: >I am trying to convert raw binary data to data with escaped octets in >order to store it in a bytea field on postgresql server. I could do this >easily in c/c++ but I need to do it in python. I am not sure how to read >and

Re: Literal Escaped Octets

2006-02-06 Thread Steve Holden
Chason Hayes wrote: > On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote: [...] >> >>The URL you reference is discussing how you represent arbitrary values >>in string literals. If you already have the data in a Python string the >>best advise is to use a parameterized query - that way your P

Re: Literal Escaped Octets

2006-02-06 Thread Chason Hayes
On Sun, 05 Feb 2006 21:07:23 -0800, Alex Martelli wrote: > Chason Hayes <[EMAIL PROTECTED]> wrote: >... >> easily in c/c++ but I need to do it in python. I am not sure how to read >> and evaluate the binary value of a byte in a long string when it is a non >> printable ascii value in python. >

Re: Literal Escaped Octets

2006-02-06 Thread Chason Hayes
On Mon, 06 Feb 2006 13:39:17 +, Steve Holden wrote: > Chason Hayes wrote: >> I am trying to convert raw binary data to data with escaped octets in >> order to store it in a bytea field on postgresql server. I could do this >> easily in c/c++ but I need to do it in python. I am not sure how to

Re: Literal Escaped Octets

2006-02-06 Thread Steve Holden
Chason Hayes wrote: > I am trying to convert raw binary data to data with escaped octets in > order to store it in a bytea field on postgresql server. I could do this > easily in c/c++ but I need to do it in python. I am not sure how to read > and evaluate the binary value of a byte in a long strin

Re: Literal Escaped Octets

2006-02-05 Thread Alex Martelli
Chason Hayes <[EMAIL PROTECTED]> wrote: ... > easily in c/c++ but I need to do it in python. I am not sure how to read > and evaluate the binary value of a byte in a long string when it is a non > printable ascii value in python. If you have a bytestring (AKA plain string) s, the binary value o

Literal Escaped Octets

2006-02-05 Thread Chason Hayes
I am trying to convert raw binary data to data with escaped octets in order to store it in a bytea field on postgresql server. I could do this easily in c/c++ but I need to do it in python. I am not sure how to read and evaluate the binary value of a byte in a long string when it is a non printable