Re: looking up function's doc in emacs

2008-12-10 Thread Daniel Fetchinson
> in programing elisp in emacs, i can press "Ctrl+h f" to lookup the doc > for the function under cursor. > > is there such facility when coding in perl, python, php? > > (i'm interested in particular python. In perl, i can work around with > "perldoc -f functionName", and in php it's php.net/funct

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Kaz Kylheku
On 2008-12-05, Xah Lee <[EMAIL PROTECTED]> wrote: > Let's say for example, we want to write a function that takes a vector > (of linear algebra), and return a vector in the same direction but > with length 1. In linear algebar terminology, the new vector is called > the “normalized” vector of the o

Re: How to pass out the result from iterated function

2008-12-10 Thread James Stroud
JD wrote: I got a iterated function like this: def iterSomething(list): has_something = False for cell in list: if something in cell: has_something = True output = something if has_something: iterSomething(output) else: final_out = outu

Re: getting back into programming

2008-12-10 Thread Gabriel Genellina
En Wed, 10 Dec 2008 19:02:16 -0200, <[EMAIL PROTECTED]> escribió: I used to program in C and Perl (up until 2001) (a little C++ and Java too). Since then I've been a Business Analyst and only coded in VBA/ Excel and written some SQL queries. (we use Sybase) I feel the need for other tools. Pr

Re: var or inout parm?

2008-12-10 Thread mh
Chris Rebert <[EMAIL PROTECTED]> wrote: > Not directly possible or encouraged. You can emulate it by sticking > the value in a container object (e.g. list) though: Thanks, that's just what I needed. I'm using this to monkeypatch a test driver into some code that I can't touch, otherwise I would

Re: Python is slow

2008-12-10 Thread Arnaud Delobelle
cm_gui <[EMAIL PROTECTED]> writes: [stuff] > Python is slow. Very slow. The same troll started this same flame earlier this year: http://groups.google.com/group/comp.lang.python/browse_thread/thread/5cea684680f63c82?q= -- Arnaud -- http://mail.python.org/mailman/listinfo/python-list

Re: Deeper tracebacks?

2008-12-10 Thread Gabriel Genellina
En Wed, 10 Dec 2008 16:59:16 -0200, brooklineTom <[EMAIL PROTECTED]> escribió: I want my exception handler to report the method that originally raised an exception, at the deepest level in the call-tree. Let give an example. That's the default behavior, you don't have to do anything special.

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Xah Lee
Xah Lee wrote: > > Let's say for example, we want to write a function that takes a vector > > (of linear algebra), and return a vector in the same direction but > > with length 1. In linear algebar terminology, the new vector is called > > the “normalized” vector of the original. > > > For those of

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Xah Lee
Xah Lee wrote: > > For those of you who don't know linear algebra but knows coding, this > > means, we want a function whose input is a list of 3 elements say > > {x,y,z}, and output is also a list of 3 elements, say {a,b,c}, with > > the condition that > > > > a = x/Sqrt[x^2+y^2+z^2] > > b = y/Sqr

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Arnaud Delobelle
"Dotan Cohen" <[EMAIL PROTECTED]> writes: > 2008/12/10 <[EMAIL PROTECTED]>: >> On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTED]> wrote: >>> >>> For those of you who don't know linear algebra but knows coding, this >>> means, we want a function whose input is a list of 3 elements say >>> {x,y,z}, and

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
On Wednesday 10 December 2008 02:44:45 pm you wrote: > > Even in statically typed languages, when you override the equality > > operator/function you can choose not to return a valid answer (raise an > > exception). And it would break all the cases mentioned above (element in > > list, etc). But th

Re: When (and why) to use del?

2008-12-10 Thread Gabriel Genellina
En Tue, 09 Dec 2008 15:29:17 -0200, Philip Semanchuk <[EMAIL PROTECTED]> escribió: On Dec 9, 2008, at 11:35 AM, Albert Hopkins wrote: def myfunction(): # do some stuff stuff my_string = function_that_returns_string() # do some stuff with my_string

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Jon Harrop
Xah Lee wrote: > On Dec 10, 12:37 pm, [EMAIL PROTECTED] wrote: >> Ruby: >> >> def norm a >> s = Math.sqrt(a.map{|x|x*x}.inject{|x,y|x+y}) >> a.map{|x| x/s} >> end > > I don't know ruby, but i tried to run it and it does not work. > > #ruby > def norm a > s = Math.sqrt(a.map{|x|x*x}.inject{|

Re: When (and why) to use del?

2008-12-10 Thread Philip Semanchuk
On Dec 10, 2008, at 5:23 PM, Gabriel Genellina wrote: En Tue, 09 Dec 2008 15:29:17 -0200, Philip Semanchuk <[EMAIL PROTECTED] > escribió: On Dec 9, 2008, at 11:35 AM, Albert Hopkins wrote: def myfunction(): # do some stuff stuff my_string = function_that_returns_str

Re: cx_Oracle issues

2008-12-10 Thread James Mills
On Thu, Dec 11, 2008 at 2:48 AM, huw_at1 <[EMAIL PROTECTED]> wrote: > Any tips - i have never seen this error before but am guessing that > the value being returned is too big for the buffer size set for the > cursor. the procedure fetches data from a LOB. > > Any suggestions/confirmations? Could

lxml.etree error: xmlSchematronSetValidStructuredErrors

2008-12-10 Thread TheIvIaxx
I have installed libxml2 and libxslt and then tried to install lxml with easy_install lxml. I can import lxml by "import lxml" but trying "from lxml import etree" and get: ImportError: /usr/local/lib/python2.5/site-packages/lxml-2.2alpha1- py2.5-linux-i686.egg/lxml/etree.so: undefined symbol: xml

Re: Mathematica 7 compares to other languages

2008-12-10 Thread John W Kennedy
Xah Lee wrote: In lisp, python, perl, etc, you'll have 10 or so lines. In C or Java, you'll have 50 or hundreds lines. C: #include #include void normal(int dim, float* x, float* a) { float sum = 0.0f; int i; float divisor; for (i = 0; i < dim; ++i) sum += x[i] * x[i]; divisor

Re: Python is slow

2008-12-10 Thread Luis M . González
You are WRONG, WRONG, WRONG!! And when I say Wrong, I mean WRONG!!! And I am not saying that you are confussed. I say that you are WRONG! And when someone says so many times that you are wrong, it is because you are WRONG! And don't say that you are not wrong, because you are wrong! You are Wron

How to convert uint64 in C into Python 32bit Object [ I am using Python2.2 ]

2008-12-10 Thread Explore_Imagination
Hi all I am new to C and python ... I want to convert C data type uint64 variable into the Python 32bit Object. I am currently using Python 2.2 [ It is necessary to use it ] Kindly give your suggestion how and in which way I can achieve this task. Looking forward for your positive feedback. Che

Re: forcing future re-import from with an imported module

2008-12-10 Thread _wolf
On Dec 10, 1:46 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Tue, 09 Dec 2008 23:27:10 -0200, _wolf <[EMAIL PROTECTED]> > escribió: > > > how can i say, approximately, "re-import the present module when it is > > imported the next time, don’t use the cache" in a simple way? i do not > >

Re: Rich Comparisons Gotcha

2008-12-10 Thread Luis Zarrabeitia
On Sunday 07 December 2008 09:21:18 pm Robert Kern wrote: > The deficiency is in the feature of rich comparisons, not numpy's > implementation of it. __eq__() is allowed to return non-booleans; however, > there are some parts of Python's implementation like list.__contains__() > that still expect t

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Jon Harrop
Xah Lee wrote: > Kaz Kylheku wrote: >> Really? ``50 or hundreds'' of lines in C? >> >> #include /* for sqrt */ >> >> void normalize(double *out, double *in) >> { >> double denom = sqrt(in[0] * in[0] + in[1] * in[1] + in[2] * >> in[2]); >> >> out[0] = in[0]/denom; >>

Re: Is 3.0 worth breaking backward compatibility?

2008-12-10 Thread News123
Troll? bye N walterbyrd wrote: > IMO: breaking backward compatibility is a big deal, and should only be > done when it is seriously needed. > > Also, IMO, most of, if not all, of the changes being made in 3.0 are > debatable, at best. I can not think of anything that is being changed > that was

Memory leak when using a C++ module for Python

2008-12-10 Thread Jaume Bonet
Hi, I'm pretty new in python programming. I've been developing a C++ module for a python application that simply gets the information from python, makes the last processing (which is very time consuming -that's why I make it in C++-). When I test the code from C++ each time I delete a vector the

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Daniel Fetchinson
On 12/10/08, Jon Harrop <[EMAIL PROTECTED]> wrote: > Xah Lee wrote: >> Kaz Kylheku wrote: >>> Really? ``50 or hundreds'' of lines in C? >>> >>> #include /* for sqrt */ >>> >>> void normalize(double *out, double *in) >>> { >>> double denom = sqrt(in[0] * in[0] + in[1] * in[1] + in[2]

Re: Dabo 0.9.0 Released

2008-12-10 Thread Fuzzyman
On Dec 10, 7:24 pm, Ed Leafe <[EMAIL PROTECTED]> wrote: > We are proud (and relieved!) to finally release Dabo 0.9.0, the first   > official release of the framework in six months. We haven't been   > taking it easy during that period; rather, we made some changes that   > clean up some weak spots

Re: var or inout parm?

2008-12-10 Thread J. Clifford Dyer
On Mon, 2008-12-08 at 00:57 -0800, Chris Rebert wrote: > On Mon, Dec 8, 2008 at 12:26 AM, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: > > Colin J. Williams a écrit : > >> > >> [EMAIL PROTECTED] wrote: > >>> > >>> How can I make a "var" parm, where the called function can modify > >>> the value

Re: Python for kids?

2008-12-10 Thread News123
Hi, [EMAIL PROTECTED] wrote: > On Dec 7, 9:13 pm, "Russ P." <[EMAIL PROTECTED]> wrote: >> I have a 12-year-old son who spends too much time playing Xbox live >> and watching silly YouTube videos. I would like to try to get him >> interested in programming. > . . . > But I think it's better for y

Re: Python is slow

2008-12-10 Thread cm_gui
You guys are living in denial. Python is SLOW, especially for web apps. Instead of getting mad, why don't get together and come up with a faster VM/interpreter? The emperor doesn't like to be told he is not wearing any clothes? On 10 Dec, 14:48, Luis M. González <[EMAIL PROTECTED]> wrote: > You

Re: forcing future re-import from with an imported module

2008-12-10 Thread rdmurray
On Wed, 10 Dec 2008 at 14:53, _wolf wrote: thanks for your answer. i am aware that imports are not designed to have side-effects, but this is exactly what i want: to trigger an action with `import foo`. you get foo, and doing this can have a side- effect for the module, in roughly the way that a

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Arne Vajhøj
Jon Harrop wrote: Xah Lee wrote: Kaz Kylheku wrote: Really? ``50 or hundreds'' of lines in C? #include /* for sqrt */ void normalize(double *out, double *in) { double denom = sqrt(in[0] * in[0] + in[1] * in[1] + in[2] * in[2]); out[0] = in[0]/denom; out

Re: Deeper tracebacks?

2008-12-10 Thread brooklineTom
On Dec 10, 5:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 10 Dec 2008 16:59:16 -0200, brooklineTom <[EMAIL PROTECTED]> > escribió: > > > I want my exception handler to report the method that originally > > raised an exception, at the deepest level in the call-tree. Let give > > a

Re: var or inout parm?

2008-12-10 Thread Joe Strout
On Dec 10, 2008, at 4:29 PM, J. Clifford Dyer wrote: [EMAIL PROTECTED] wrote: How can I make a "var" parm, where the called function can modify the value of the parameter in the caller? See Also: the earlier heated debate thread over what evaluation strategy Python uses (Survey says!: call-b

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Bakul Shah
John W Kennedy wrote: Xah Lee wrote: In lisp, python, perl, etc, you'll have 10 or so lines. In C or Java, you'll have 50 or hundreds lines. C: #include #include void normal(int dim, float* x, float* a) { float sum = 0.0f; int i; float divisor; for (i = 0; i < dim; ++i) sum +=

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Bakul Shah
Bakul Shah wrote: John W Kennedy wrote: Xah Lee wrote: In lisp, python, perl, etc, you'll have 10 or so lines. In C or Java, you'll have 50 or hundreds lines. C: #include #include void normal(int dim, float* x, float* a) { float sum = 0.0f; int i; float divisor; for (i = 0; i

Re: How to pass out the result from iterated function

2008-12-10 Thread Rhodri James
On Wed, 10 Dec 2008 20:16:56 -, JD <[EMAIL PROTECTED]> wrote: I got a iterated function like this: def iterSomething(list): has_something = False for cell in list: if something in cell: has_something = True output = something if has_something:

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Kaz Kylheku
On 2008-12-10, Xah Lee <[EMAIL PROTECTED]> wrote: > Xah Lee wrote: >> > means, we want a function whose input is a list of 3 elements say ^^ ^^^ > Kaz, pay attention: [ reformatted to 7 bit USASCII ] > Xah wrote: Note, that the norm > o

broken ncurses on python 3.0

2008-12-10 Thread icarus
OS: win32, python 3.0 I've been trying to run some curses demos and I get this: C:\Python\Lib\curses>python textpad.py Traceback (most recent call last): File "textpad.py", line 3, in import curses File "C:\Python\lib\curses\__init__.py", line 15, in from _curses import * ImportErro

@ you can study through online freely all the computer language. Easy way and free registration. Visit www.tiketin.blogspot.com @

2008-12-10 Thread free online study about computer language
Now easy way to clear all your computer language doubts and to learn more visit www.tiketin.blogspot.com everything is free. You can also get e-books freely. No need to waste time and money visit www.tiketin.blogspot.com way to learn from your home itself visit www.tiketin.blogspot.com -- http://m

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Xah Lee
On Dec 10, 2:47 pm, John W Kennedy <[EMAIL PROTECTED]> wrote: > Xah Lee wrote: > > In lisp, python, perl, etc, you'll have 10 or so lines. In C or Java, > > you'll have 50 or hundreds lines. > > C: > > #include > #include > > void normal(int dim, float* x, float* a) { >     float sum = 0.0f; >  

Re: lxml.etree error: xmlSchematronSetValidStructuredErrors

2008-12-10 Thread TheIvIaxx
nvm, i got it working. Checking the docs for libxsltmod i was given the tip to add: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib -- http://mail.python.org/mailman/listinfo/python-list

Re: Python music sequencer timing problems

2008-12-10 Thread John O'Hagan
On Wed, 10 Dec 2008, badmuthahubbard wrote: > I've been trying to get the timing right for a music sequencer using > Tkinter. First I just loaded the Csound API module and ran a Csound > engine in its own performance thread. The score timing was good, > being controlled internally by Csound, but

internal circular class references

2008-12-10 Thread Ethan Furman
Greetings List! I'm writing a wrapper to the datetime.date module to support having no date. Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but there is one thing I would like to change -- datetime.date.max and datetime.d

@ you can study through online freely all the computer language. Easy way and free registration. Visit www.tiketin.blogspot.com @

2008-12-10 Thread free online study about computer language
Now easy way to clear all your computer language doubts and to learn more visit www.tiketin.blogspot.com everything is free. You can also get e-books freely. No need to waste time and money visit www.tiketin.blogspot.com way to learn from your home itself visit www.tiketin.blogspot.com -- http://m

Re: internal circular class references

2008-12-10 Thread James Stroud
Ethan Furman wrote: Greetings List! I'm writing a wrapper to the datetime.date module to support having no date. Its intended use is to hold a date value from a dbf file, which can be empty. The class is functional at this point, but there is one thing I would like to change -- datetime.da

Re: Mathematica 7 compares to other languages

2008-12-10 Thread William James
Jon Harrop wrote: > Xah Lee wrote: > > On Dec 10, 12:37 pm, [EMAIL PROTECTED] wrote: > >> Ruby: > > > > >> def norm a > >> s = Math.sqrt(a.map{|x|x*x}.inject{|x,y|x+y}) > >> a.map{|x| x/s} > >> end > > > > I don't know ruby, but i tried to run it and it does not work. > > > > #ruby > > def

New EasyPC website launch.

2008-12-10 Thread canton . alex
Hello Everyone, This post has been posted to discuss the launch of the new forum website named "EasyPC". If you would like to help run this website please email me on [EMAIL PROTECTED] If interested please visit http://easypc.top-talk.net It would be greatly appreciated if we could get as many peop

Re: Re: Python is slow

2008-12-10 Thread acerimusdux
cm_gui wrote: You guys are living in denial. Python is SLOW, especially for web apps. Instead of getting mad, why don't get together and come up with a faster VM/interpreter? The emperor doesn't like to be told he is not wearing any clothes? O The one in denial is the one without any eviden

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Chris Rathman
On Dec 10, 6:51 pm, Xah Lee <[EMAIL PROTECTED]> wrote: > I've now gather code solutions in ruby, python, C, Java, here: > > now lacking is perl, elisp, which i can do well in a condensed way. > It'd be interesting also to have javascript... and perhaps erlang, > OCaml/F#, Haskell too. Pay me $6

Re: internal circular class references

2008-12-10 Thread Terry Reedy
James Stroud wrote: I resisted posting a similar question recently. After much consideration, I realized that the inability to reference a class inside its own definition must have been a deliberate design of the language. The class *does not exist* to be referenced from inside its body unti

Re: internal circular class references

2008-12-10 Thread Carl Banks
On Dec 10, 5:26 pm, Ethan Furman <[EMAIL PROTECTED]> wrote: > Greetings List! > > I'm writing a wrapper to the datetime.date module to support having no > date.  Its intended use is to hold a date value from a dbf file, which > can be empty. > > The class is functional at this point, but there is o

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Juan Pablo Romero Méndez
In R: norm = function(v) v/sqrt(sum(v^2)) :) Juan Pablo 2008/12/10 Arnaud Delobelle <[EMAIL PROTECTED]>: > "Dotan Cohen" <[EMAIL PROTECTED]> writes: > >> 2008/12/10 <[EMAIL PROTECTED]>: >>> On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTED]> wrote: For those of you who don't know l

Re: Compiling and installing python 2.5.2 with Visual C++ 2008

2008-12-10 Thread Juan Pablo Romero Méndez
Finally installed Python 2.6, which is compiled with visual C++ 2008, and all my problems went away. Thanks to all, Juan Pablo 2008/12/10 "Martin v. Löwis" <[EMAIL PROTECTED]>: >> - >> ... >> error: Python was built with Visual Studio

Re: Python is slow

2008-12-10 Thread James Mills
@em_gui: You are outrightly wrong. Why ? Python's VM is not slow! In fact it's quite fast. What does tend to be slow is sloppy poorly designed code. Django/Turbogears (sorry for any devs reading this) are large frameworks with a lot of complexity - and yes they tend to be a little cumbersome and s

Re: internal circular class references

2008-12-10 Thread Carl Banks
On Dec 10, 8:18 pm, James Stroud <[EMAIL PROTECTED]> wrote: > Ethan Furman wrote: > > Greetings List! > > > I'm writing a wrapper to the datetime.date module to support having no > > date.  Its intended use is to hold a date value from a dbf file, which > > can be empty. > > > The class is function

Re: Python is slow

2008-12-10 Thread Carl Banks
On Dec 10, 12:42 pm, cm_gui <[EMAIL PROTECTED]> wrote: > Python is SLOW.    And I am not comparing it with compiled languages > like C. > Python is even slower than PHP! cm_gui is TROLL. And I am not compring it with bots like Aaron Castironpi Brody. cm_gui is even troller than Xah Lee! Carl

Re: Rich Comparisons Gotcha

2008-12-10 Thread Steven D'Aprano
On Wed, 10 Dec 2008 17:21:51 -0500, Luis Zarrabeitia wrote: > I do numeric work... I'm finishing my MSc in applied math and I'm > programing mostly with python. And I'd rather have a.compare_with(b), or > a.elementwise_compare(b), or whatever name, rather than (a==b).all(). Unluckily for you, th

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Roberto Bonvallet
Arnaud Delobelle wrote: > def unit(v): > return map((sum(map(lambda x:x*x, v))**0.5).__rdiv__, v) > > The hard bit was to make it less readable than the Ruby version ;) I loved the use of __rdiv__ :) I would have proposed the more straightforward: def u(v): return [x/sum(x**2 for

Re: Python is slow

2008-12-10 Thread Benjamin Kaplan
On Wed, Dec 10, 2008 at 10:25 PM, Carl Banks <[EMAIL PROTECTED]>wrote: > On Dec 10, 12:42 pm, cm_gui <[EMAIL PROTECTED]> wrote: > > Python is SLOW.And I am not comparing it with compiled languages > > like C. > > Python is even slower than PHP! > > > cm_gui is TROLL. And I am not compring it

Re: Deeper tracebacks?

2008-12-10 Thread Chris Rebert
On Wed, Dec 10, 2008 at 3:50 PM, brooklineTom <[EMAIL PROTECTED]> wrote: > On Dec 10, 5:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> En Wed, 10 Dec 2008 16:59:16 -0200, brooklineTom <[EMAIL PROTECTED]> >> escribió: >> >> > I want my exception handler to report the method that original

Re: How to convert uint64 in C into Python 32bit Object [ I am using Python2.2 ]

2008-12-10 Thread John Machin
On Dec 11, 9:49 am, Explore_Imagination <[EMAIL PROTECTED]> wrote: > Hi all > > I am new to C and python ... I want to convert C data type uint64 > variable into the Python 32bit Object. I am currently using Python 2.2 > [ It is necessary to use it ] > > Kindly give your suggestion how and in which

Re: Python is slow

2008-12-10 Thread MRAB
Benjamin Kaplan wrote: On Wed, Dec 10, 2008 at 10:25 PM, Carl Banks <[EMAIL PROTECTED] > wrote: On Dec 10, 12:42 pm, cm_gui <[EMAIL PROTECTED] > wrote: > Python is SLOW.And I am not comparing it with compiled languages

Re: Deeper tracebacks?

2008-12-10 Thread brooklineTom
On Dec 10, 10:49 pm, "Chris Rebert" <[EMAIL PROTECTED]> wrote: > On Wed, Dec 10, 2008 at 3:50 PM, brooklineTom <[EMAIL PROTECTED]> wrote: > > On Dec 10, 5:03 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> > > wrote: > >> En Wed, 10 Dec 2008 16:59:16 -0200, brooklineTom <[EMAIL PROTECTED]> > >> escribi

density plot

2008-12-10 Thread yuniyuni21
Hi, Does anyone know how to make the density plot, more specifically a gaussian-smoothed version of a histogram. Actually, it's not exactly a plot that I want. What I want to do is get the maximum count (or highest peak) of the density distribution. It's different from the probability density f

Re: Mathematica 7 compares to other languages

2008-12-10 Thread toby
On Dec 10, 3:37 pm, [EMAIL PROTECTED] wrote: > On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTED]> wrote: > > > > > For those of you who don't know linear algebra but knows coding, this > > means, we want a function whose input is a list of 3 elements say > > {x,y,z}, and output is also a list of 3 elem

Call by reference in SWIG?

2008-12-10 Thread Nok
I can't get call-by-reference functions to work in SWIG... Even when wrapping a trivial example like this: /* File : trivial.i */ %module trivial %inline %{ class test { public: void foo(int *t) { *t=42; } }; %} I get a TypeError when trying to use it: import trivial

Call by reference in SWIG?

2008-12-10 Thread Nok
I can't get call-by-reference functions to work in SWIG... Even when wrapping a trivial example like this: /* File : trivial.i */ %module trivial %inline %{ class test { public: void foo(int *t) { *t=42; } }; %} I get a TypeError when trying to use it: import trivial

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Paul Rudin
"Dotan Cohen" <[EMAIL PROTECTED]> writes: > 2008/12/10 <[EMAIL PROTECTED]>: >> On Dec 5, 9:51 am, Xah Lee <[EMAIL PROTECTED]> wrote: >>> >>> For those of you who don't know linear algebra but knows coding, this >>> means, we want a function whose input is a list of 3 elements say >>> {x,y,z}, and

multiprocessing+simplehttpserver+windows

2008-12-10 Thread Nabla Kvadrat
Hi, can someone please help me with/explain if following problem can be somehow resolved? I have Py2.6.1 win32 and I'm playing around with multiprocessing module. Trying examples here: http://docs.python.org/library/multiprocessing.html#examples. Example with SimpleHTTPServer.HttpServer don't work

if expression source format

2008-12-10 Thread
The "if" expression leads to long statements. Please offer suggestions to beautify this function. For this example use maximum line length marked by the 's. Thank you. ## def compute_wind_chill_temperture(T:'Temperature, dF',s:'W

Re: multiprocessing+simplehttpserver+windows

2008-12-10 Thread Nabla Kvadrat
Additional information: complete traceback: Serving at http://localhost:8000 using 2 worker processes To exit press Ctrl-Break Traceback (most recent call last): File "C:\workspaces\workspace\skrserver-multiprocess\src\t.py", line 70, in test() File "C:\workspaces\workspace\skrserver-mult

Re: Python is slow

2008-12-10 Thread Jeremiah Dodds
Does anybody else think it's really funny when people argue over which language used for _web apps_ is fastest? I mean, I'm not aware of any language that's slow enough to make it noticeable compared to say, network latency or database access. I guess you might notice if you're not caching any cont

why doesn't pop/clear call __delitem__ on a dict?

2008-12-10 Thread Daniel Fetchinson
I just found out that if I want to have a custom dict it's not enough to overload __getitem__, __setitem__ and __delitem__ because, for example, pop and clear don't call __delitem__. I.e. an instance of the following will not print 'deleted' upon instance.pop( 'key' ): class mydict( dict ): de

Re: density plot

2008-12-10 Thread David Cournapeau
On Thu, Dec 11, 2008 at 1:57 PM, <[EMAIL PROTECTED]> wrote: > Hi, > > Does anyone know how to make the density plot, more specifically a > gaussian-smoothed version of a histogram. Actually, it's not exactly > a plot that I want. What I want to do is get the maximum count (or > highest peak) of

<    1   2