First  |  Prev |  Next  |  Last
Pages: 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
Use of cmp() (was Re: Limitation of os.walk)
[nitpicking one specific point] In article <pan.2010.05.13.03.29.00(a)REMOVE.THIS.cybersource.com.au>, Steven D'Aprano <steven(a)REMOVE.THIS.cybersource.com.au> wrote: On the other hand a cmp function is specific to sorting, and nothing but sorting. Not quite. cmp() is useful any time you have an expensive ... 13 May 2010 00:43
buffer objects (C-API)
Hi at all, is it possible that a buffer object deallocates the memory when the object is destroyed? I want to wrap the buffer object around some memory. Or is there any chance that the buffer object copies the memory so it will be responsible when it will be destroyed? Thanks in advance, bye. moerchendiser2... 12 May 2010 23:38
How to test whether bit is set within a flag with Python ?
robert somerville wrote: I am trying to determine how to test whether variors bits are set within a byte (or larger flag) , the python 'and' and 'or' do not seem to be doing what i want .. does anybody have some sample code showing how to do it ?? e.g. (in "C") unsigned char a = 6; i... 12 May 2010 19:12
Need help using callables and setup in timeit.Timer
I want to time some code that depends on some setup. The setup code looks a little like this: b = range(1, 1001) And the code I want to time looks vaguely like this: sorted(b) Except my code uses a different function than sorted. But that ain't important right now. Anyhow, I know how ... 12 May 2010 11:21
client to upload big files via https and get progress info
Hi, I'd like to perform huge file uploads via https. I'd like to make sure, - that I can obtain upload progress info (sometimes the nw is very slow) - that (if the file exceeds a certain size) I don't have to read the entire file into RAM. I found Active states recipe 146306, which constructs the whole mul... 14 May 2010 04:04
PEP 3119 ABC - And how I learned to love the Abstract Bomb
Today I was doing a major re-write of a library I called yajl-py that wraps the json 'sax-like' c-parser yajl, and decided I should look into absract base classes since I knew they had been added to py26. Truthfully, I was surprised when I found out that the BDFL accepted this PEP, but hey were in 2010 :p. So I ... 26 May 2010 00:31
Why the inconsistent of those two base64 methods?
I'd like to encode a string in base64, but I found a inconsistent of two methods: 'aaa'.encode('base64') 'YWFh\n' import base64 base64.b64encode('aaa') 'YWFh' as you can see, the result of 'aaa'.encode('base64') has a '\n' at the end, but the other method doesn't. Why the inconsistent... 12 May 2010 13:35
Version 0.3.9 of the Python config module has been released.
Version 0.3.9 of the Python config module has been released. What Does It Do? ================ The config module allows you to implement a hierarchical configuration scheme with support for mappings and sequences, cross-references between one part of the configuration and another, the ability to flexibly access... 11 May 2010 19:01
py2exe help
python help, I'm open for suggestions. I'm using py2exe to compile a working program. The program runs and prints fine until I compile it with py2exe. After compiling the program, it runs fine until it tries to import the win32ui module, v2.6214.0. Then, I get a windows error message: ImportError:... 11 May 2010 22:19
open(False) in python3
I'm unsure if this qualifies as a bug (it is also clearly user error) but I just ran into a situation where open() was inadvertantly called on a False, and I was somewhat surprised to see that this didn't bail horribly, but rather hung forever. Here's some example sessions for python3.x and python2.x: <redacted>... 12 May 2010 23:38
First  |  Prev |  Next  |  Last
Pages: 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129