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

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: 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

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

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

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

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

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 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

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: 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

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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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

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: 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

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

@ 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

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

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

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: 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; >  

@ 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

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

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

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 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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]

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: 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

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: 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: 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 > >

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: 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

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

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: 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

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: 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 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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: [OT] Google Groups in bad odour

2008-12-10 Thread Arnaud Delobelle
Frank Millman <[EMAIL PROTECTED]> writes: > Hi all > > I know there have been complaints about spam on Google Groups over the > last few months, with some members rejecting all traffic from them. > > You might be interested in this comment I got in a reply from someone > on comp.os.linux.setup - >

Re: getting back into programming

2008-12-10 Thread M.-A. Lemburg
On 2008-12-10 22:02, [EMAIL PROTECTED] wrote: > 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. > Primarily I w

Re: "as" keyword woes

2008-12-10 Thread Patrick Mullen
On Wed, Dec 10, 2008 at 11:57 AM, Benjamin Kaplan <[EMAIL PROTECTED]> wrote: > > > On Wed, Dec 10, 2008 at 12:22 PM, Patrick Mullen <[EMAIL PROTECTED]> > wrote: >> >> I don't have a huge stake in this, but I wouldn't mind a change to >> allow anything proceeding a "." or preceeding a "(" to not be

looking up function's doc in emacs

2008-12-10 Thread Xah Lee
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/functionName. Bot

Re: Mathematica 7 compares to other languages

2008-12-10 Thread Dotan Cohen
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 output is also a list of 3 elements, say {a,b,c},

pydb 1.24

2008-12-10 Thread R. Bernstein
This release is to clear out some old issues. It contains some bugfixes, document corrections, and enhancements. Tests were revised for Python 2.6 and Python without readline installed. A bug involving invoking from ipython was fixed. The "frame" command is a little more like gdb's. Exceptions are

getting back into programming

2008-12-10 Thread usawargamer
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. Primarily I want to write a bunch of small programs to query a database

Re: Mathematica 7 compares to other languages

2008-12-10 Thread w_a_x_man
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 elements, say {a,b,c}, with > the condition that > > a = x/Sq

upgrading my SIMPL Programming with Python nofee online course need some volunteer testers

2008-12-10 Thread bobicanprogram
SIMPL is an open source project which has been around for almost 10 years. It maintains a very compact interprocesss communication library which gives Linux developers the Send/Receive/Reply messaging paradigm first popularized by QNX almost 30 years ago. (http://www.icanprogram.com/simpl). SIMP

Re: How to pass out the result from iterated function

2008-12-10 Thread eric
On Dec 10, 9:16 pm, 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: get todays files

2008-12-10 Thread Andrew Doades
Tim Chase wrote: This looks very good and I have tested successfully, but is there a way I can set the today to automatically become todays date in that format? Yes...see the python datetime module[1]...particularly the strftime() call on date/datetime objects. -tkc [1] http://docs.python.

Re: How to pass out the result from iterated function

2008-12-10 Thread Gary Herron
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: >

Re: Python is slow

2008-12-10 Thread Bruno Desthuilliers
cm_gui a écrit : (snip FUD) see also: http://groups.google.com/group/comp.lang.python/browse_frm/thread/5cea684680f63c82 by the same troll^M^M^M^M^Msmart guy. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python is slow

2008-12-10 Thread D'Arcy J.M. Cain
On Wed, 10 Dec 2008 21:04:12 +0100 Stef Mientki <[EMAIL PROTECTED]> wrote: > cm_gui wrote: > > [...] > Put this guy in the junk filter, What's the point if people like you are just going to repost his entire message like that? -- D'Arcy J.M. Cain <[EMAIL PROTECTED]> | Democracy is thr

How to pass out the result from iterated function

2008-12-10 Thread JD
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 = outupt The prob

Re: SequenceMatcher bug ?

2008-12-10 Thread Gabriel Genellina
En Wed, 10 Dec 2008 15:14:20 -0200, eliben <[EMAIL PROTECTED]> escribió: > My system is Gentoo, which installs python from source.  Maybe gentoo > applies patches that the binary releases don't have. I can't reproduce the problem. I got exactly the same results (0.999...)   with all the relea

Re: Python is slow

2008-12-10 Thread Stef Mientki
cm_gui wrote: http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-a-faster-python-vm.html I fully agree with Krzysztof Kowalczyk . Can't they build a faster VM for Python since they love the language so much? Python is SLOW.And I am not comparing it with compiled languages

Re: "as" keyword woes

2008-12-10 Thread Benjamin Kaplan
On Wed, Dec 10, 2008 at 12:22 PM, Patrick Mullen <[EMAIL PROTECTED]>wrote: > On Wed, Dec 10, 2008 at 6:57 AM, MRAB <[EMAIL PROTECTED]> wrote: > > Aaron Brady wrote: > >> > >> On Dec 9, 12:40 pm, MRAB <[EMAIL PROTECTED]> wrote: > >>> > >>> Aaron Brady wrote: > > On Dec 9, 8:28 am, MRAB <[

Re: Python is slow

2008-12-10 Thread George Sakkis
On Dec 10, 1:42 pm, cm_gui <[EMAIL PROTECTED]> wrote: > http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... > > I fully agree with Krzysztof Kowalczyk . > Can't they build a faster VM for Python since they love the language > so much? WTF is Krzysztof Kowalczyk and why should

Re: Python is slow

2008-12-10 Thread Duncan Booth
Tim Chase <[EMAIL PROTECTED]> wrote: > [nibbling a little flame-bait] > >> Python is even slower than PHP! >> >> Just go to any Python website and you will know. >> An example is: >> http://www2.ljworld.com/ > > I'm not sure I'm seeing what you're seeing -- the dynamic page > loaded in under 2

Re: Rich Comparisons Gotcha

2008-12-10 Thread M.-A. Lemburg
On 2008-12-10 20:01, Luis Zarrabeitia wrote: > On Wednesday 10 December 2008 10:50:57 am M.-A. Lemburg wrote: >> On 2008-12-10 16:40, Luis Zarrabeitia wrote: >>> Quoting Rasmus Fogh <[EMAIL PROTECTED]>: Rhamphoryncus wrote: >> Rich comparisons were added to Python at the request of the >> Nume

Re: Python is slow

2008-12-10 Thread Jason Scheirer
On Dec 10, 10:42 am, cm_gui <[EMAIL PROTECTED]> wrote: > http://blog.kowalczyk.info/blog/2008/07/05/why-google-should-sponsor-... > > I fully agree with Krzysztof Kowalczyk . > Can't they build a faster VM for Python since they love the language > so much? > > Python is SLOW.    And I am not compar

Re: Python is slow

2008-12-10 Thread Thorsten Kampe
* cm_gui (Wed, 10 Dec 2008 10:42:40 -0800 (PST))> > Python is SLOW.And I am not comparing it with compiled languages > like C. > Python is even slower than PHP! Sure. But Perl is faster than Ruby (exactly 2.53 times as fast). And Python is 1.525 times faster than VisualBasic (or was it the o

Re: Python is slow

2008-12-10 Thread Tim Chase
[nibbling a little flame-bait] Python is even slower than PHP! Just go to any Python website and you will know. An example is: http://www2.ljworld.com/ I'm not sure I'm seeing what you're seeing -- the dynamic page loaded in under 2 seconds -- about on par with sun.com, python.org, php.net

Re: Python is slow

2008-12-10 Thread Benjamin Kaplan
On Wed, Dec 10, 2008 at 2:07 PM, Paul McGuire <[EMAIL PROTECTED]> wrote: > On Dec 10, 12:42 pm, cm_gui <[EMAIL PROTECTED]> wrote: > > Python is slow. Very slow. > > And... ? Was there a question or specific suggestion in there > somewhere? > > Do you go to your mechanic and say "My car wont go a

Dabo 0.9.0 Released

2008-12-10 Thread Ed Leafe
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 in the codebase, and as a result can offer a much more solid f

  1   2   >