First  |  Prev |  Next  |  Last
Pages: 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
ctypes: delay conversion from c_char_p to string
I have a function exposed through ctypes that returns a c_char_p. Since I need to deallocate that c_char_p, it's inconvenient that ctypes copies the c_char_p into a string instead of giving me the raw pointer. I believe this will cause a memory leak, unless ctypes is smart enough to free the string itself after the... 24 Apr 2010 09:24
ctypes errcheck question
According to the ctypes docs: An errcheck function should return the args tuple when used with out parameters (section Function prototypes). However, in other cases it says to return the result, or whatever result you want returned from the function. I have... 23 Apr 2010 20:49
Smtpd module
Hello, I would like to use smtpd module to write very simple smtp server but this server must: 1. accept several connections at the same time( like a forking server) 2. have basic authentication  that is it must understand AUTH command. Does anyone know if the smtpd module have both? http://twis... 23 Apr 2010 20:49
Deleting more than one element from a list
Is the del instruction able to remove _at the same_ time more than one element from a list ? For instance, this seems to be correct : z=[45,12,96,33,66,'ccccc',20,99] del z[2], z[6],z[0] z [12, 33, 66, 'ccccc', 20] However, the following doesn't work : z=[45,12,96,33,66,'... 25 Apr 2010 04:23
xml.dom.minidom character encoding
I have the following simple script running on 2.5.2 on a machine where the default character encoding is "ascii": #!/usr/bin/env python #coding: utf-8 import xml.dom.minidom import codecs str=u"<?xml version=\"1.0\" encoding=\"utf-8\"?><elements><elem attrib= \"ó\"/></elements>" doc=xml.dom.minidom.parseS... 23 Apr 2010 20:49
problem when running .py file
Dear Officer, I first apologize that I am totally new for python. I have downloaded a code packet “triMC3D” from online, and within it there is a file “”.I downloaded and installed python and some related packages, tried very hard, but there is still the following error: the Traceback (mos... 23 Apr 2010 23:18
Declarative programming for the Model part of an application
Dear all, Last week, I raised the question "Could declarative programming be useful for the Model part of an application ?", and I suggested an open-source project, Yoopf, to provide such a paradigm in Python. Stefan told me that the proposal lacked clarity. I have thus updated the description, and he now finds... 23 Apr 2010 20:49
shove does not store data as expected
Dear all, I'm trying to use the shove module ( for a simple script. The script read a CSV file ad store the data. When I check the content of the "store" object (instance of Shove) *before* I close it, the data are all there but when I close and re- open it some data are lost. How... 23 Apr 2010 20:49
rfind bug ?
On Wed, Apr 21, 2010 at 1:51 AM, Stef Mientki <stef.mientki(a)> wrote: With the following code, I would expect a result of 5 !! a= 'word1 word2 word3' a.rfind(' ',7) 11 Is this a bug ? No. Don't you think someone would have found such an obvious bug by now? You want regular str.f... 23 Apr 2010 20:49
question about an exciting gotcha for unittests (and elsewhere)...
On 4/23/2010 8:03 AM, Cameron Simpson wrote: On 23Apr2010 13:25, Peter Otten<__peter__(a)> wrote: | Move the unit tests into a separate script and have that import the module | cs.nodedb.node. Hmm. I have been very attracted by the idea of having the unittest in the module itself, and run if I ... 23 Apr 2010 20:48
First  |  Prev |  Next  |  Last
Pages: 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147