are doing this quite extensively at work, and have found that in the
long run SWIG is the best solution. OMMV, but if you ask me, the answer
is SWIG.
mvh,
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
even when 'a' is a plain python list.
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
30 Nov 2005 04:23:37 -0800 skrev [EMAIL PROTECTED]:
>
> Mandus ha escrito:
>
>> works just fine on my ubunty 5.10. Make sure you have the python2.4-tk
>> package installed (sudo apt-get install python2.4-tk).
>>
>
> yes, i got it.
> It's a fresh instalation
nter # with underscore, and lowercase 't'
> import Tkinter # no underscore, uppercase 'T'
> Tkinter._test() # note underscore in _test()
works just fine on my ubunty 5.10. Make sure you have the python2.4-tk
package installed (sudo apt-get install python2.4-tk).
--
Mandus - t
you Caps Lock?
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
code Java, be happy :-)
mvh,
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
se MPI also in your extension module?
mvh,
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
Wed, 29 Jun 2005 08:33:58 -0700 skrev Scott David Daniels:
> Mandus wrote:
>> 29 Jun 2005 10:04:40 GMT skrev F. Petitjean:
>>
>>>Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit :
>>>
>>>res = [ bb+ii*dd for bb,ii,dd in zip(b,i,d) ]
>>
>
29 Jun 2005 10:04:40 GMT skrev F. Petitjean:
> Le Wed, 29 Jun 2005 09:46:15 + (UTC), Mandus a écrit :
>> Hi there,
>>
>> inspired by a recent thread where the end of reduce/map/lambda in Python was
>> discussed, I looked over some of my maps, and tried to convert the
+ii*dd,b,i,d)
which gives a list of length n.
Anyone have an idea what the equivalent list comprehension will be?
take care,
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
Sun, 26 Jun 2005 08:35:58 +0200 skrev Peter Otten:
> Steven D'Aprano wrote:
>
>> On Sat, 25 Jun 2005 21:30:26 +0200, Peter Otten wrote:
>>
>>> Mandus wrote:
>>>
>>>> By using the builtin reduce, I
>>>> move the for-loop into the c-
ome of my test shows. But then I
should probably write c-functions that deals with the numeric arrays
anyway.
Besides, functions like 'operator.add' is also in c, maybe that helps.
But I admit it's not a perfect example.
--
Mandus - the only mandus around.
--
http://mail.python
Sat, 25 Jun 2005 21:30:26 +0200 skrev Peter Otten:
> Mandus wrote:
>
>> By using the builtin reduce, I
>> move the for-loop into the c-code which performs better.
>
> No. There is no hope of ever writing fast code when you do not actually
> measure its performance.
I
need to be a function? Why complicate matters? Isn't it
> simpler to just do this:
[snip]
I guess he have some reason for it...
it's because python do call by value, not by reference for such simple
variables.
If you absolutely want to do this, you can try:
def incr(counter):
cou
;
>
> Couldnt there just be a "functional" module ?...
>
> from functional import map, filter, reduce
but lambda is grammar, so probably not so easy to import?
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
Sun, 26 Jun 2005 04:36:51 +1000 skrev Steven D'Aprano:
> On Sat, 25 Jun 2005 17:41:58 +0200, Konstantin Veretennicov wrote:
>
>> On 6/25/05, Mandus <[EMAIL PROTECTED]> wrote:
>>> It is really a consensus on this; that
>>> removing map, filter, reduce is
s; that
removing map, filter, reduce is a good thing? It will render a whole lot
of my software unusable :(
Sure, I guess I can port most of it to list comprehensions, but
reduce/map are so much nicer.
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
[snip]
>
> set_callback(obj,
> lambda x: (if a:
>2
> else:
>3)
>
[snip]
You can do stuff like this: lambda x: x and 2 or 3
Of course, you are still quite limited in what you can do, but it have
solved some of my problems...
le effort.
mvh,
--
Mandus - the only mandus around.
--
http://mail.python.org/mailman/listinfo/python-list
19 matches
Mail list logo