My mistake seems to be that I declared
char a, b;
instead of
int a, b;
Thank you for sorting this out.
Joachim
--
http://mail.python.org/mailman/listinfo/python-list
In the Ubuntu 9.10 version of Python 3.1 (using your patch), there's a
related bug:
>>> foo(b='b')
will set the value of a in the extension module to zero, thus clearing
whatever
default value it may have had. In other words, the optional character
arguments
that are skipped seem to be nulled by
thanks - the patch fixed my problem.
Joachim
On Dec 1, 5:51 am, casevh wrote:
> On Nov 30, 2:18 pm, Joachim Dahl wrote:
>
>
>
>
>
> > I think that "C" encoding is what I need, however I run into an odd
> > problem.
> > If I use the following C
args, kwrds, "|CC", kwlist, &a,
&b))
return NULL;
...
then the following works:
>>> foo('a')
>>> foo('a','b')
>>> foo(a='a',b='b')
but the following fails:
>>> foo(b='b'
quot;c", kwlist,
&foochar))
return NULL;
...
The question remains the same: why can't I pass a single character
argument to this function under Python3.1?
Thanks.
Joachim
On Nov 30, 9:52 pm, Joachim Dahl wrote:
> I am updating an extension module from Python2.6 to Python3.
>
I am updating an extension module from Python2.6 to Python3.
I used to pass character codes to the extension module, for example, I
would write:
>>> foo('X')
with the corresponding C extension routine defined as follows:
static PyObject* foo(PyObject *self, PyObject *args, PyObject *kwrds)
{
ch
In Python2.x, I used PyFile_Check(obj) to check if a parameter was a
file object.
Now, in Python3.0 the same object (obtained as open('file.bin','wb'))
is an
io.BufferedWriter object.
How do I perform type checking for such an object in the extension
module,
and how do I extract a FILE * object f
Fabio Zadrozny wrote:
Has anyone been able to use both Pydev and CDT to debug extension
modules?
The question was asked about a year ago on this list, and I am hoping
that
someone has figured it out in meantime.
Previous answers on that:
https://sourceforge.net/forum/message.php?msg_id
Has anyone been able to use both Pydev and CDT to debug extension
modules?
The question was asked about a year ago on this list, and I am hoping
that
someone has figured it out in meantime.
Joachim
--
http://mail.python.org/mailman/listinfo/python-list
CVXOPT supports ILP via GLPK or MOSEK. Documentation is in the doc-
strings
for cvxopt.glkp.ilp and cvxopt.mosek.ilp.
The ILP interfaces are not mentioned otherwise in the documentation,
as the main
focus of CVXOPT is convex solvers.
For additional questions on CVXOPT please use the discussion fo
I am trying to make a customized install script for an extension module
using the distutils.ccompiler class.
I want to embed an existing makefile for the C libraries into the Python
setup script, but I am not sure what's the right way to do it...
E.g., say I want to compile a project as:
gcc -
11 matches
Mail list logo