On 2016-08-22, Larry Martell wrote:
> On Mon, Aug 22, 2016 at 1:25 PM, Jon Ribbens
> wrote:
>> On 2016-08-22, Larry Martell wrote:
>>> (Pdb) type(request.POST[key])
>>>
>>> (Pdb) request.encoding = "iso-8859-1"
>>> (Pdb) type(request.POST[key])
>>> *** MultiValueDictKeyError:
>>> "u'right-carot
On Mon, Aug 22, 2016 at 1:25 PM, Jon Ribbens wrote:
> On 2016-08-22, Larry Martell wrote:
>> On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens
>> wrote:
>>> On 2016-08-19, Larry Martell wrote:
fd.write(request.POST[key])
>>>
>>> You could try:
>>>
>>> request.encoding = "iso-8859-1"
>>> fd
On Mon, 22 Aug 2016 13:21:43 -0400, Larry Martell wrote:
> On Fri, Aug 19, 2016 at 4:51 PM, Lawrence D’Oliveiro
> wrote:
>> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>>>
>>> An 'octet' is a byte of 8 bits.
>>
>> Is there any other size of byte?
>
> Many, many years ag
On 2016-08-22, Larry Martell wrote:
> On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens
> wrote:
>> On 2016-08-19, Larry Martell wrote:
>>> fd.write(request.POST[key])
>>
>> You could try:
>>
>> request.encoding = "iso-8859-1"
>> fd.write(request.POST[key].encode("iso-8859-1"))
>>
>> It's hacky
On Fri, Aug 19, 2016 at 4:51 PM, Lawrence D’Oliveiro
wrote:
> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>>
>> An 'octet' is a byte of 8 bits.
>
> Is there any other size of byte?
Many, many years ago, probably c. 1982 my Dad came into my house and
saw a Byte Magazine l
On Mon, Aug 22, 2016 at 10:36 AM, Larry Martell wrote:
> On Fri, Aug 19, 2016 at 4:24 PM, Chris Kaynor
> wrote:
>> On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell
>> wrote:
>>
>>> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote:
>>> > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell
>>> w
On Fri, Aug 19, 2016 at 4:24 PM, Chris Kaynor wrote:
> On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell
> wrote:
>
>> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote:
>> > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell
>> wrote:
>> >> I have some python code (part of a django app) that pro
On Sun, Aug 21, 2016 at 5:24 PM, Jon Ribbens wrote:
> On 2016-08-19, Larry Martell wrote:
>> fd.write(request.POST[key])
>
> You could try:
>
> request.encoding = "iso-8859-1"
> fd.write(request.POST[key].encode("iso-8859-1"))
>
> It's hacky and nasty and there might be a better "official" me
On 2016-08-19, Larry Martell wrote:
> fd.write(request.POST[key])
You could try:
request.encoding = "iso-8859-1"
fd.write(request.POST[key].encode("iso-8859-1"))
It's hacky and nasty and there might be a better "official" method
but I think it should work.
--
https://mail.python.org/mailma
Random832 :
> On Sat, Aug 20, 2016, at 03:50, Marko Rauhamaa wrote:
>> 2'scomplement arithmetics is quite often taken advantage of in C
>> programming. Unfortunately, with the castration of signed integers
>> with the most recent C standards, 2's-complement has been dangerously
>> broken.
>
> No p
On 2016-08-19, Random832 wrote:
> On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote:
>> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>> >
>> > An 'octet' is a byte of 8 bits.
>>
>> Is there any other size of byte?
>
> Not very often anymore. Used to be some system
On Sat, Aug 20, 2016, at 03:50, Marko Rauhamaa wrote:
> 2'scomplement arithmetics is quite often taken advantage of in C
> programming. Unfortunately, with the castration of signed integers with
> the most recent C standards, 2's-complement has been dangerously broken.
No part of any version of th
Random832 :
> On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote:
>> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>> > An 'octet' is a byte of 8 bits.
>> Is there any other size of byte?
> Not very often anymore.
The main difference between an octet and a byte is t
On Fri, Aug 19, 2016, at 21:09, Steve D'Aprano wrote:
> Depends what you mean by "byte", but the short answer is "Yes".
>
> In the C/C++ standard, bytes must be at least eight bytes. As the below
> FAQ
> explains, that means that on machines like the PDP-10 a C++ compiler will
> define bytes to be
On Sat, 20 Aug 2016 06:51 am, Lawrence D’Oliveiro wrote:
> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>>
>> An 'octet' is a byte of 8 bits.
>
> Is there any other size of byte?
Depends what you mean by "byte", but the short answer is "Yes".
In the C/C++ standard, byt
On Fri, Aug 19, 2016, at 16:51, Lawrence D’Oliveiro wrote:
> On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
> >
> > An 'octet' is a byte of 8 bits.
>
> Is there any other size of byte?
Not very often anymore. Used to be some systems had 9-bit bytes, and of
course a lot of c
On Saturday, August 20, 2016 at 6:03:53 AM UTC+12, Terry Reedy wrote:
>
> An 'octet' is a byte of 8 bits.
Is there any other size of byte?
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, Aug 19, 2016 at 12:00 PM, Larry Martell
wrote:
> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote:
> > On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell
> wrote:
> >> I have some python code (part of a django app) that processes a
> >> request that contains a png file. The request is
On Fri, Aug 19, 2016 at 3:00 PM, Larry Martell wrote:
> On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote:
>> On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell
>> wrote:
>>> I have some python code (part of a django app) that processes a
>>> request that contains a png file. The request is sen
On Fri, Aug 19, 2016 at 1:24 PM, Chris Angelico wrote:
> On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell
> wrote:
>> I have some python code (part of a django app) that processes a
>> request that contains a png file. The request is send with
>> content_type = 'application/octet-stream'
>>
>> In
On 8/19/2016 1:10 PM, Larry Martell wrote:
I have some python code (part of a django app) that processes a
request that contains a png file. The request is send with
content_type = 'application/octet-stream'
An 'octet' is a byte of 8 bits. So the content is a stream of bytes and
MUST NOT be d
On Sat, Aug 20, 2016 at 3:10 AM, Larry Martell wrote:
> I have some python code (part of a django app) that processes a
> request that contains a png file. The request is send with
> content_type = 'application/octet-stream'
>
> In the python code I want to write this data to a file and still have
I have some python code (part of a django app) that processes a
request that contains a png file. The request is send with
content_type = 'application/octet-stream'
In the python code I want to write this data to a file and still have
it still be a valid png file.
The data I get looks like this:
23 matches
Mail list logo