Re: How to run python without python

2010-04-03 Thread David Cournapeau
On Sat, Apr 3, 2010 at 2:23 AM, Chris Rebert wrote: > On Fri, Apr 2, 2010 at 10:09 AM, danmcle...@yahoo.com > wrote: >> On Apr 1, 5:54 pm, Chris Rebert wrote: >>> On Thu, Apr 1, 2010 at 4:46 PM, Krister Svanlund >>> wrote: >>> > On Fri, Apr 2, 2010 at 1:36 AM, Spencer wrote: >>> >> Is there a

Re: Changing the EAX register with Python

2010-11-19 Thread David Cournapeau
On Fri, Nov 19, 2010 at 4:17 PM, Tim Roberts wrote: > dutche wrote: >> >>Hi folks, I have a unusual question here. >> >>How can I change the value of EAX register under python under Linux?? >>As paimei does under Windows. >> >>My project is to have a python program that loads a C program and sets

Re: which scipy binary for Win32

2011-01-25 Thread David Cournapeau
On Tue, Jan 25, 2011 at 6:24 PM, Adam wrote: > Am looking at > http://sourceforge.net/projects/scipy/files/scipy/0.8.0/ > and I wonder which is the binary to install on WinXP ? > As pointed to by this page, http://www.scipy.org/Download > > All I can see on that sourceforge page are the huge > pyt

Re: Download Proprietary Microsoft Products Now

2010-04-21 Thread David Cournapeau
On Thu, Apr 22, 2010 at 9:59 AM, Lawrence D'Oliveiro wrote: >> ... or because Mingw32 doesn't provide the header files (in particular >> wrt. C++), or because linking with a library is necessary that uses the >> MSVC mangling, not the g++ one (again, for C++). > > Again, that would be code that’s

Re: Another "Go is Python-like" article.

2010-05-21 Thread David Cournapeau
On Fri, May 21, 2010 at 11:20 PM, Grant Edwards wrote: > In a recent Reg article, there's yet more yammering on about how Go is > somehow akin to Python -- referring to Go as a "Python-C++" crossbreed. > > http://www.theregister.co.uk/2010/05/20/go_in_production_at_google/ > > I still don't get it

Re: where are the program that are written in python?

2010-05-23 Thread David Cournapeau
On Sun, May 23, 2010 at 5:19 PM, Lie Ryan wrote: > But the point still hold, that in real life, often the language's raw > speed doesn't really limit the program's speed. I would rather say that Python vs C does not matter until it does, and it generally does when constants factor matter (which

Re: MySQLdb install vs. "setuptools"

2010-05-30 Thread David Cournapeau
On Sun, May 30, 2010 at 3:56 PM, John Nagle wrote: >   MySQLdb won't install as non-root on Python 2.6 because > its "setup.py" file requires "setuptools".  "setuptools", > unlike "distutils", isn't part of the Python 2.6 distribution. > >   IMPORTANT PACKAGES SHOULD NOT USE "setuptools".  Use the

Re: MySQLdb install vs. "setuptools"

2010-05-30 Thread David Cournapeau
On Mon, May 31, 2010 at 7:16 AM, John Nagle wrote: >    It's nice that some of the options work.  Note that someone who > used "--bindir", expecting it to work, might end up overwriting their > existing Python installation unintentionally, which would break system > administration tools like cPan

Re: Is this make sence? Dynamic assembler for python

2010-06-21 Thread David Cournapeau
On Mon, Jun 21, 2010 at 12:34 PM, Steven D'Aprano wrote: > On Sun, 20 Jun 2010 22:45:14 +0100, Rhodri James wrote: > >> Mixing Python and assembler is a bizarre thing to want to do in general, >> but... >> >> On Sun, 20 Jun 2010 01:52:15 +0100, Steven D'Aprano >> wrote: >> >>> (3) Modern C compil

Re: Should I Learn Python or Ruby next?

2010-06-22 Thread David Cournapeau
On Tue, Jun 22, 2010 at 5:58 PM, Josef Tupag wrote: > I've been programming (when I do program) mainly in Perl for the last 10 > years or so. But I've been itching to learn a new language for a while now, > and the two near the top of the list are Ruby and Python. > > I figure that Ruby would be e

Re: I strongly dislike Python 3

2010-06-27 Thread David Cournapeau
On Sun, Jun 27, 2010 at 4:54 PM, Martin v. Loewis wrote: >> I didn't notice this level of angst when Python made equally significant >> changes going from 1.5 to 2.0... > > I think the *level* was about the same (IIRC). People would say that > they ignore 2.x for years, and that it is important to

Re: I strongly dislike Python 3

2010-06-27 Thread David Cournapeau
On Sun, Jun 27, 2010 at 11:46 PM, Peter Kleiweg wrote: > David Cournapeau schreef op de 27e dag van de zomermaand van het jaar 2010: > >> I doubt "porting is easier than you think" will convince many people >> if they don't know what the gain will be. For examp

Re: Bento 0.0.3 (ex-toydist), a pythonic packaging solution

2010-07-02 Thread David Cournapeau
On Fri, Jul 2, 2010 at 4:46 PM, Tim Golden wrote: > > Looks very interesting. Just one thing (which might just be me): > the front page looks very stylish and is quite a nice summary. > But I actually *missed* the (grey on grey) [Take me to Bento documentation] > button, which is way below the fo

Re: GAE + recursion limit

2010-07-02 Thread David Cournapeau
On Fri, Jul 2, 2010 at 5:06 PM, Maciej wrote: > Does anyone have any clue what that might be? > Why the problem is on GAE (even when run locally), when command line > run works just fine (even with recursion limit decreased)? > Thanks in advance for any help. Most likely google runs a customized

Re: Why Is Escaping Data Considered So Magical?

2010-07-02 Thread David Cournapeau
On Mon, Jun 28, 2010 at 6:44 PM, Gregory Ewing wrote: > Carl Banks wrote: > >> Indeed, strncpy does not copy that final NUL if it's at or beyond the >> nth element.  Probably the most mind-bogglingly stupid thing about the >> standard C library, which has lots of mind-boggling stupidity. > > I don

Re: Lua is faster than Fortran???

2010-07-04 Thread David Cournapeau
On Sun, Jul 4, 2010 at 5:03 PM, Stefan Behnel wrote: > sturlamolden, 04.07.2010 05:30: >> >> I was just looking at Debian's benchmarks. It seems LuaJIT is now (on >> median) beating Intel Fortran! >> >> C (gcc) is running the benchmarks faster by less than a factor of two. >> Consider that Lua is

Re: Lua is faster than Fortran???

2010-07-04 Thread David Cournapeau
On Sun, Jul 4, 2010 at 11:23 PM, D'Arcy J.M. Cain wrote: > On 04 Jul 2010 04:15:57 GMT > Steven D'Aprano wrote: >> "Need" is a bit strong. There are plenty of applications where if your >> code takes 0.1 millisecond to run instead of 0.001, you won't even >> notice. Or applications that are limit

Re: Lua is faster than Fortran???

2010-07-04 Thread David Cournapeau
On Mon, Jul 5, 2010 at 12:00 AM, D'Arcy J.M. Cain wrote: > On Sun, 4 Jul 2010 23:46:10 +0900 > David Cournapeau wrote: >> On Sun, Jul 4, 2010 at 11:23 PM, D'Arcy J.M. Cain wrote: >> > Which is 99% of the real-world applications if you factor out the code >

Re: Lua is faster than Fortran???

2010-07-04 Thread David Cournapeau
On Mon, Jul 5, 2010 at 1:12 AM, sturlamolden wrote: > On 4 Jul, 10:03, Stefan Behnel wrote: > >> Sort of. One of the major differences is the "number" type, which is (by >> default) a floating point type - there is no other type for numbers. The >> main reason why Python is slow for arithmetic co

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-05 Thread David Cournapeau
On Mon, Jul 5, 2010 at 12:44 PM, Terry Reedy wrote: > On 7/4/2010 7:58 PM, John Nagle wrote: > >> The "incompatible with all extension modules I need" part >> is the problem right now. A good first step would be to >> identify the top 5 or 10 modules that are blocking a move to >> Python 3 by majo

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-06 Thread David Cournapeau
On Tue, Jul 6, 2010 at 4:30 AM, D'Arcy J.M. Cain wrote: > On Mon, 05 Jul 2010 14:42:13 -0400 > Terry Reedy wrote: >> Good start. Now what is blocking those four? >> Lack of developer interest/time/ability? >> or something else that they need? > > How about a basic how-to document?  I maintain PyG

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread David Cournapeau
On Tue, Jul 6, 2010 at 6:00 PM, Alf P. Steinbach /Usenet wrote: > * sturlamolden, on 06.07.2010 17:50: >> >> Just a little reminder: >> >> Microsoft has withdrawn VS2008 in favor of VS2010. The express version >> is also unavailable for download.>:(( >> >> We can still get a VC++ 2008 compiler req

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread David Cournapeau
On Wed, Jul 7, 2010 at 12:26 AM, Thomas Jollans wrote: > On 07/07/2010 12:08 AM, David Cournapeau wrote: >> On Tue, Jul 6, 2010 at 6:00 PM, Alf P. Steinbach /Usenet >> wrote: >>> There is no *technical* problem creating a compiler-independent C/C++ >>> languag

Re: The real problem with Python 3 - no business case for conversion (was "I strongly dislike Python 3")

2010-07-07 Thread David Cournapeau
On Wed, Jul 7, 2010 at 10:55 PM, Carl Banks wrote: > On Jul 7, 1:31 am, Paul McGuire wrote: >> On Jul 6, 3:30 am, David Cournapeau wrote:> On Tue, Jul >> 6, 2010 at 4:30 AM, D'Arcy J.M. Cain wrote: >> >> > One thing that would be very useful is how to mai

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-07 Thread David Cournapeau
On Wed, Jul 7, 2010 at 9:10 PM, Martin v. Loewis wrote: > > My preferred long-term solution is to reduce the usage of the C library > in CPython as much as reasonable, atleast on Windows. Memory management > could directly use the heap functions (or even more directly > VirtualAlloc); filenos cou

Re: Python -- floating point arithmetic

2010-07-07 Thread David Cournapeau
On Thu, Jul 8, 2010 at 5:41 AM, Zooko O'Whielacronx wrote: > I'm starting to think that one should use Decimals by default and > reserve floats for special cases. > > This is somewhat analogous to the way that Python provides > arbitrarily-big integers by default and Python programmers only use >

Re: numpy installation

2010-07-25 Thread David Cournapeau
Hi Jia, On Sun, Jul 25, 2010 at 12:01 PM, Jia Hu wrote: > Hello: > > I tried to install numpy 1.4.1 from source under ubuntu following > instruction at http://docs.scipy.org/doc/numpy/user/install.html > I type "" python setup.py build –help-fcompiler ""  and it says gnu95 is > found. Then I run

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-25 Thread David Cournapeau
On Mon, Jul 26, 2010 at 3:07 AM, Zooko O'Whielacronx wrote: > > I would suggest that people try to build their native extension > modules with mingw, and if it doesn't work report a bug (to mingw > project and to the Python project) so that we can track more precisely > what the issues are. To b

Re: Why is python not written in C++ ?

2010-08-02 Thread David Cournapeau
On Mon, Aug 2, 2010 at 10:20 AM, Christian Heimes wrote: > > In your opinion what would Python gain from a C++ implementation? The elusive advantages of "OO" in C++ are relatively minor compared to RIIA which would make reference counting much easier to deal with. But even that is not a strong e

Re: Why is python not written in C++ ?

2010-08-05 Thread David Cournapeau
On Fri, Aug 6, 2010 at 8:45 AM, Roy Smith wrote: > In article , >  Lawrence D'Oliveiro wrote: > >> In message , Roy Smith wrote: >> >> > C++, for all its flaws, had one powerful feature which made it very >> > popular.  It is a superset of C. >> >> Actually, it never was. > > Yes, there are a few

Re: Why is python not written in C++ ?

2010-08-06 Thread David Cournapeau
On Fri, Aug 6, 2010 at 8:39 PM, Roy Smith wrote: > In article , >  David Cournapeau wrote: > >> > Yes, there are a few corner cases where valid C syntax has different >> > semantics in C and C++.  But, they are very few.  Calling C++ a superset >> > of C i

Re: Python Portability

2010-08-08 Thread David Cournapeau
On Sun, Aug 8, 2010 at 10:10 AM, W. eWatson wrote: > On 8/7/2010 4:45 PM, Martin v. Loewis wrote: >>> >>> To add to the msg I just sent to M. Torrie. We are given the msi >>> programs for Python, PIL,matplotlib, and numpy. The question of how to >>> uninstall and re-install a different version rem

Re: Python "why" questions

2010-08-16 Thread David Cournapeau
On Mon, Aug 16, 2010 at 9:53 AM, Gregory Ewing wrote: >> On Aug 7, 2010, at 9:14 PM, John Nagle wrote: >> >>>  The languages which have real multidimensional arrays, rather >>> than arrays of arrays, tend to use 1-based subscripts.  That >>> reflects standard practice in mathematics. > > Not alway

Re: speed of numpy.power()?

2010-08-25 Thread David Cournapeau
On Wed, Aug 25, 2010 at 10:59 PM, Carlos Grohmann wrote: > Hi all, > > I'd like to hear from you on the benefits of using numpy.power(x,y) > over (x*x*x*x..) Without more context, I would say None if x*x*x*x*... works and you are not already using numpy. The point of numpy is mostly to work on

Re: using libraries not installed on campus computers (numpy)

2009-06-09 Thread David Cournapeau
On Tue, Jun 9, 2009 at 7:40 PM, Chandramouli wrote: > I built and installed Numpy on my campus account, the install couldn't > be done on the python install location. So I did it on my local > storage location but I am clueless about how to use it I was expecting > to see a numpy.py in the install

Re: matplotlib installation

2009-06-12 Thread David Cournapeau
On Fri, Jun 12, 2009 at 9:50 PM, Jean-Paul Calderone wrote: > On Fri, 12 Jun 2009 11:33:36 GMT, Alan G Isaac wrote: >> >> On 6/12/2009 5:55 AM Virgil Stokes apparently wrote: >>> >>> Any suggestions on installing matplotlib for Python 2.6.2 on a Windows >>> Vista platform? >> >> >> Maintainers for

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread David Cournapeau
On Tue, Jul 28, 2009 at 12:12 AM, Dotan Cohen wrote: >> Creating binaries is not the same as creating /fast, efficient/ binaries. >>  Py2Exe bundles it all together, but does not make it any faster. >> > > How inefficient is py2exe. It is neither efficient or inefficient: it is just a distribution

Re: Looking for a dream language: sounds like Python to me.

2009-07-27 Thread David Cournapeau
On Tue, Jul 28, 2009 at 12:28 AM, Dotan Cohen wrote: >> It is neither efficient or inefficient: it is just a distribution >> tool, to deploy python software in a form familiar to most windows >> users. It does not make it any faster than running the software under >> a python prompt. >> >> As much

Re: Internal Math Library of Numpy

2009-07-28 Thread David Cournapeau
On Tue, Jul 28, 2009 at 10:09 PM, Nanime Puloski wrote: > Does Numpy use Python's standard math library when calculating > elementary functions such as exp(x) and acos(x)? It depends on the dtype: for fundamental types (float, int, etc...), the underlying implementation is whatever the (C) math li

Re: Using Python to automate builds

2009-08-05 Thread David Cournapeau
On Wed, Aug 5, 2009 at 4:56 PM, Hendrik van Rooyen wrote: > On Tuesday 04 August 2009 21:13:10 Kosta wrote: >> I am a Python newbie, tasked with automating (researching) building >> Windows drivers using the WDK build environment.  I've been looking >> into Python for this (instead of writing a bun

Re: Using Python to automate builds

2009-08-06 Thread David Cournapeau
On Thu, Aug 6, 2009 at 12:39 AM, Kosta wrote: > > Setenv.bat sets up the path and other environment variables build.exe > needs to compile and link (and even binplace) its utilities.  So > building itself is not the issue.  The problem is that if I call > setenv.bat from Python and then build.exe,

Re: Cython + setuptools not working with .pyx,only with .c-files

2009-08-06 Thread David Cournapeau
On Thu, Aug 6, 2009 at 7:38 PM, Diez B. Roggisch wrote: > Hi, > > > I'm trying to build a Cython-extension as Egg. > > However, this doesn't work - I can either use distutils to build the > extension, creating a myextension.c-file on the way. > > If that's there, I can use setuptools to build the e

Re: Cython + setuptools not working with .pyx,only with .c-files

2009-08-07 Thread David Cournapeau
On Fri, Aug 7, 2009 at 7:09 PM, Diez B. Roggisch wrote: > > Tried that, nothing changed :( Then you will have to modify Cython.Distutils to be aware of setuptools, I think (and soon Distribute... ). David -- http://mail.python.org/mailman/listinfo/python-list

Re: Why all the __double_underscored_vars__?

2009-08-08 Thread David Cournapeau
On Sat, Aug 8, 2009 at 9:11 PM, kj wrote: > In Chris Rebert > writes: > >>The double-underscores indicate that the Python interpreter itself >>usually is the caller of the method, and as such some level of "magic" >>may be associated with it. Other languages have you do the equivalent >>of `def

Re: ubuntu dist-packages

2009-08-27 Thread David Cournapeau
On Thu, Aug 27, 2009 at 8:27 AM, Diez B. Roggisch wrote: > Paul Boddie wrote: > >> On 26 Aug, 17:48, Jorgen Grahn wrote: >>> >>> Well, if you are thinking about Debian Linux, it's not as much >>> "ripping out" as "splitting into a separate package with a non-obvious >>> name". Annoying at times, b

Re: Speed-up for loops

2010-09-04 Thread David Cournapeau
On Thu, Sep 2, 2010 at 7:02 PM, Michael Kreim wrote: > Hi, > > I was comparing the speed of a simple loop program between Matlab and > Python. > > My Codes: > $ cat addition.py > imax = 10 > a = 0 > for i in xrange(imax): >    a = a + 10 > print a > > $ cat addition.m > imax = 1e9; > a = 0

Re: Speed-up for loops

2010-09-07 Thread David Cournapeau
On Sun, Sep 5, 2010 at 8:28 PM, BartC wrote: > > One order of magnitude (say 10-20x slower) wouldn't be so bad. That's what > you might expect for a dynamically typed, interpreted language. 10/20x slower than C is only reached by extremely well optimized dynamic languages. It would be a tremendo

Re: fast kdtree tree implementation for python 3?

2010-09-11 Thread David Cournapeau
On Sun, Sep 12, 2010 at 4:26 AM, Stefan Behnel wrote: > _wolf, 11.09.2010 20:15: >> >> does anyone have a suggestion for a ready-to-go, fast kdtree >> implementation for python 3.1 and up, for nearest-neighbor searches? i >> used to use the one from numpy/scipy, but find it a pain to install >> fo

Re: visual studio 2010 question

2010-09-19 Thread David Cournapeau
On Mon, Sep 20, 2010 at 3:08 PM, Ralf Haring wrote: > > After running into the error "Setup script exited with error: Unable > to find vcvarsall.bat" when trying to use easy_install / setuptools a > little digging showed that the MS compiler files in distutils only > support up to Studio 2008. Doe

Re: visual studio 2010 question

2010-09-21 Thread David Cournapeau
On Tue, Sep 21, 2010 at 5:54 AM, Diez B. Roggisch wrote: > David Cournapeau writes: > >> On Mon, Sep 20, 2010 at 3:08 PM, Ralf Haring wrote: >>> >>> After running into the error "Setup script exited with error: Unable >>> to find vcvarsall.bat&quo

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread David Cournapeau
On Tue, Sep 21, 2010 at 10:23 PM, Diez B. Roggisch wrote: > Ant writes: > >> Hi all, >> >> I've just seen this: http://sheddingbikes.com/posts/1285063820.html >> >> Whatever you think of Zed Shaw (author of the Mongrel Ruby server and >> relatively recent Python convert), he has a very good point

Re: Python in Linux - barrier to Python 3.x

2010-09-21 Thread David Cournapeau
On Wed, Sep 22, 2010 at 12:59 AM, Diez B. Roggisch wrote: > David Cournapeau writes: > >> On Tue, Sep 21, 2010 at 10:23 PM, Diez B. Roggisch wrote: >>> Ant writes: >>> >>>> Hi all, >>>> >>>> I've just seen this: http://shed

Re: Python in Linux - barrier to Python 3.x

2010-09-24 Thread David Cournapeau
On Fri, Sep 24, 2010 at 4:51 PM, Steven D'Aprano wrote: > On Tue, 21 Sep 2010 13:54:55 -0700, Ant wrote: > >> Yes you are right - I've checked on my home machine, and it is indeed >> 2.6. Still, no Python 3 unless I upgrade to Fedora 13, and upgrading an >> OS in order to get the latest version of

Re: Python in Linux - barrier to Python 3.x

2010-09-24 Thread David Cournapeau
On Fri, Sep 24, 2010 at 6:23 PM, Steven D'Aprano wrote: >> Typically, if your want to install say >> matplotlib with pygtk with a custom built python, you are in for a fun >> ride because you have to rebuild everything. > > That's not what I consider a typical case. But I take your point. It is

<    1   2