Thanks! I'll try that.
Sorry for replying so late - just didn't get to it.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Hoi,
as I got no answers with the previous question (subject: disabling
compiler flags in distutils), I thought I should ask the question in a
different way: Is there an option to set the compiler flags for a C/C++
extension in distutils? There is the extra_compile_args-option in the
Extension
Hoi,
I've written an extension in C++ which compiles wonderfully. However, I
want to compile it using a setup script with distutils and distutils
gives the compiler the unwanted (!) flag "-Wstrict-prototypes", which is
a flag only understood when compiling C. The C++ compiler runs, but
issues
On Wed, 25 Feb 2009 07:52:03 -0800, anti-suho wrote:
> In scipy module, there is a function named misc.lena which can return an
> array of numpy.ndarray type. If you use this array as parameter of
> matplotlib.pyplot.imshow and then call the matplotlib.pyplot.imshow
> function, an image will be sh
Hi,
>> I have a problem using my software on my 64bit laptop, after an update
>> of my system. The same code still runs on 32bit Intel, but on my laptop
>> I provoke the crash in the title. The crash is caused - as narrowed
>> down by me - by returning a static PyObject from a C-extension
>> funct
Thanks David!
It's still not debugged, but indeed: I get a bunch of warnings. And this
already showed me that there are more potential problems than my first
guess indicated. Alas, for my specific problem I cannot work with ints
chars and doubles. I need to have unsigned longs at some points.
Hoi,
I have a problem using my software on my 64bit laptop, after an update of
my system. The same code still runs on 32bit Intel, but on my laptop I
provoke the crash in the title. The crash is caused - as narrowed down by
me - by returning a static PyObject from a C-extension function.
Well, no
Peter Otten wrote:
>
> How did you determine that standard python floats are not good enough?
> Everything beyond that is unlikely to be supported by the hardware and
> will therefore introduce a speed penalty.
>
> Did you try gmpy?
I would like to add: If Python's precision (or that of additiona
Thank you so much - I was such an idiot (see below).
>>> I see nothing wrong with your code so I'd say it is somewhere else (did
>>> you snip any code between the end of the loop and the return?).
>
>>No. (Apart from freeing allocated memory.)
>
> I'm pretty sure we'll find something interesting
> I do need speed. Is there an option?
Mind telling us what you *actually* want to achieve? (What do you want to
calculate?)
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Thank you. At least I can exclude another few error sources, now.
Cédric Lucantis wrote:
> I see nothing wrong with your code so I'd say it is somewhere else (did
> you snip any code between the end of the loop and the return?).
No. (Apart from freeing allocated memory.)
> I've never
> seen tho
Hi,
currently I have a problem understanding Py_BuildValue. I have this code:
static PyObject *function(PyObject *self, PyObject *args) {
PyObject * python_return_value = NULL;
PyObject * dummy = NULL;
double * internal_list;
/* converting to python representation */
for (i
Ok now, I know where the error is: "y" actually contained refcounts. This,
of course, is complete nonsense and causes the interpreter to crash at some
point.
Thanks to all of you: You helped at least to track down the problem.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
> Check if either x or y are NULL.
They aren't. Just did an explicit check.
--
http://mail.python.org/mailman/listinfo/python-list
> What happens if you get rid of the ()?
Can't see any difference.
--
http://mail.python.org/mailman/listinfo/python-list
Hi
I'm having trouble with Py_BuildValue. I was able to pinpoint the following
statement as the one causing a seg. fault with my script:
static PyObject * funcname(PyObject *self, PyObject *args) {
...
return Py_BuildValue("(OO)", x, y);
}
where x & y are both of type PyObject.
Any suggestions
> You didn't mention speed in your original post.
Sorry, perhaps I considered this self-evident - which it is, of course, not.
> What about using
> array.array? Unless I am mistaken, these are just a thin wrapper
> around normal C arrays.
The algorithm I want to implement requires several millio
Thanks. Point is that all such approaches would require lots(!) of calls to
the Python API - a way by which I won't gain the desired speed.
I've tried pyrex and the corresponding C-file is so convoluted with dummy
variables, incrementing & decrementing references, and other stuff, that I
want to
Think, that I'm still at the wrong track. Point is that I cannot find any
examples and don't know where to start here.
Perhaps my problem boils down to two questions:
I'd like to pass lists (in some cases nested ones) from Python to C and
convert those Python-lists to C-arrays (e. g. of doubles). M
Mark Dickinson wrote:
> Well, it's pretty clear: you misspelt "length" as "lenght". :)
Well, that's not it ;-). (Damn copy & paste plague ...)
>
> PySequence_Fast doesn't return an array: it returns a PyObject---in
> this case, a PyObject corresponding to a Python tuple.
That's it. Thanks. Thi
Hi,
I would like to write a C-extension function for an application of mine. For
this I need to pass a nested list (like: [[a, b, c], [d, e, f], ...], where
all letters are floats) to the C-function. Now, with the code I have the
compiler is complaining: "subscripted value is neither array nor poi
Thanks everyone,
I knew there must be a snippet somewhere, just couldn't find one! (Just for
the sake of completeness: Order doesn't matter and I hope that with my data
I won't reach the recursion depth limit.)
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Hoi,
I have the following data structure (of variable size actually, to make
things simple, just that one):
d = {'a': {'x':[1,2,3], 'y':[4,5,6]},
'b': {'x':[7,8,9], 'y':[10,11,12]}}
This can be read as a dict of possibilities: The entities 'a' and 'b' have
the parameters 'x' and 'y', each. An
Thanks Peter and Vinay,
I finally understood.
And indeed, removing the pyc-file in questions solves the problem - at least
temporarily.
Christian
--
http://mail.python.org/mailman/listinfo/python-list
Peter Otten wrote:
> Vinay Sajip wrote:
>
>> This is a known bug, and not specifically related to logging, though
>> it sometimes manifests itself via logging:
>>
>> http://bugs.python.org/issue1180193
>
> Yup, thanks for looking into it.
>
> Peter
Thanks Vinay, but I am curious how issue 1180
Hi
I have the following file structure
MANIFEST
README
INSTALL -- all text
setup.py
src/
__init__.py
foo.py
for_ext.pyx
and this setup-script:
import sys
from distutils.core import setup
from distutils.extension import Extension
try:
from Pyrex.Distutils import build_ext
except
Thanks Peter and Gabriel,
I see, so I should provide the application with an additional handler for
the file in order to gain maximum independence of the two handlers (console
& file stream).
>> Also, adding %(funcName)-8s to the formatter in basigConfig does not work
>> for me: instead of the fu
Hi,
having the following code:
import logging
logging.basicConfig(level=logging.ERROR,
format='%(levelname)-8s %(message)s',
filename='mc_rigid.log',
filemode='w')
# define a Handler which writes INFO messages or higher to the sys.stderr
Thanks Simon & Gerard!
I will check those exampels out.
Christian
PS Of course, I did google - but apparently not creative enough.
--
http://mail.python.org/mailman/listinfo/python-list
If starship does not get up anymore (give it a few hours) you might want to
have a look here:
http://www.python.org/ftp/python/contrib-09-Dec-1999/Network/
Else, I can send you a tarfile of version 2.1, too.
As hg said, apart from a few deprecation warnings it's working fine for me
(but I'm only u
Hi,
I'd like to hack a function which returns all possible permutations as lists
(or tuples) of two from a given list. So far, I came up with this solution,
but it turned out to be too slow for the given problem, because the list
passed ("atomlist") can be some 1e5 items long:
def permute(at
[EMAIL PROTECTED] wrote:
> hi
> is it possible to create excel files using python in Unix env?
> if so, what module should i use?
> thanks
You might want to give pyExelerator a try:
http://sourceforge.net/projects/pyexcelerator
Remark: I had the problem of having a bunch of Data on my Linux machi
32 matches
Mail list logo