Re: Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread Chris Rebert
ences between C and I Python. I'm learning Python using > "Learning python" (figures :), so I was wondering - what are the > practical differences between the two ? If I start with IPython, will > I be able to switch to CPython later, or will I have trouble with that > ?

Can python (CPython) and IPython coexist normally on the same computer ?

2009-03-11 Thread scoop
ing python" (figures :), so I was wondering - what are the practical differences between the two ? If I start with IPython, will I be able to switch to CPython later, or will I have trouble with that ? Does IPython supports standard libraries like numpy and matplotlib ? Greetings to all of you

Re: CPython loading modules into memory

2009-02-11 Thread sjbrown
On Feb 11, 2:00 pm, "Martin v. Löwis" wrote: > > Can someone describe the details of how Python loads modules into > > memory?  I assume once the .py file is compiled to .pyc that it is > > mmap'ed in.  But that assumption is very naive.  Maybe it uses an > > anonymous mapping?  Maybe it does othe

Re: CPython loading modules into memory

2009-02-11 Thread Martin v. Löwis
> Can someone describe the details of how Python loads modules into > memory? I assume once the .py file is compiled to .pyc that it is > mmap'ed in. But that assumption is very naive. Maybe it uses an > anonymous mapping? Maybe it does other special magic? This is all > very alien to me, so i

Re: CPython loading modules into memory

2009-02-11 Thread Robert Kern
On 2009-02-11 15:30, sjbrown wrote: Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This i

CPython loading modules into memory

2009-02-11 Thread sjbrown
Can someone describe the details of how Python loads modules into memory? I assume once the .py file is compiled to .pyc that it is mmap'ed in. But that assumption is very naive. Maybe it uses an anonymous mapping? Maybe it does other special magic? This is all very alien to me, so if someone

Re: JDBC in CPYTHON

2009-02-05 Thread M.-A. Lemburg
On 2009-02-05 03:49, KMCB wrote: > Thanks Simon and Marc, > > I currently have an app on OSX that I wanted to migrate to NIX, it > uses a ODBC DBAPI interface to communicate with Filemaker. > Unfortunately, FMP does not support linux drivers. They do have a > JDBC driver that looks like it may wo

Re: JDBC in CPYTHON

2009-02-04 Thread KMCB
Thanks Simon and Marc, I currently have an app on OSX that I wanted to migrate to NIX, it uses a ODBC DBAPI interface to communicate with Filemaker. Unfortunately, FMP does not support linux drivers. They do have a JDBC driver that looks like it may work. My preference was to run that app on one

Re: JDBC in CPYTHON

2009-02-04 Thread M.-A. Lemburg
On 2009-02-03 19:30, KMCB wrote: > I was wondering if anyone was aware of a JDBC DBAPI module for > cpython. I have looked at PYJDBC and was interested in avoiding using > that extra level of ICE. I was thinking maybe someone would have back > ported zxJDBC from Jython. Or us

Re: JDBC in CPYTHON

2009-02-03 Thread Simon Brunning
2009/2/3 KMCB : > I was wondering if anyone was aware of a JDBC DBAPI module for > cpython. I have looked at PYJDBC and was interested in avoiding using > that extra level of ICE. I was thinking maybe someone would have back > ported zxJDBC from Jython. Or used that as a starti

JDBC in CPYTHON

2009-02-03 Thread KMCB
I was wondering if anyone was aware of a JDBC DBAPI module for cpython. I have looked at PYJDBC and was interested in avoiding using that extra level of ICE. I was thinking maybe someone would have back ported zxJDBC from Jython. Or used that as a starting point, to create a module and had a C

How to best return a string from C to CPython 2.5?

2008-10-06 Thread dylan . fun
I'm trying to return a Python string from a C++ function (actually inside gnuradio) using CPython 2.5. My C++ function is declared like: typedef struct { int size; unsigned char *data; } STRING STRINGBUF myfunc(std::string s) { STRINGBUF buf; . . . buf.size = s.length(); buf

Re: CPython VM internals - Wiki page

2008-07-22 Thread Martin v. Löwis
> That's interesting. It's dumber than I thought. All temporaries > on the stack are "boxed" as PyObjects. That's simple and portable, > but slow. Not only that - Python does not ever have the concept of unboxed values, except for local variables in the C implementations of arithmetic operat

Re: CPython VM internals - Wiki page

2008-07-22 Thread John Nagle
Terry Reedy wrote: Various people have asked on c.l.p about documentation of CPython's virtual machine internals. The usual answers have been to see the dis module doc for bytecodes and 'read the code' for more. Jakob Sievers did so and posted his notes, with additions from Martin v. Löwis, a

CPython VM internals - Wiki page

2008-07-22 Thread Terry Reedy
Various people have asked on c.l.p about documentation of CPython's virtual machine internals. The usual answers have been to see the dis module doc for bytecodes and 'read the code' for more. Jakob Sievers did so and posted his notes, with additions from Martin v. Löwis, as http://wiki.pyth

Re: CPython VM & byte code resources wanted

2008-04-09 Thread Steve Holden
Steve Holden wrote: > Aaron Gray wrote: >> "Aaron Gray" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >>> Hi, >>> >>> I am looking to study the CPython source code, but I cannot seem to find >>> the VM code. &

Re: CPython VM & byte code resources wanted

2008-04-08 Thread Steve Holden
Aaron Gray wrote: > "Aaron Gray" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] >> Hi, >> >> I am looking to study the CPython source code, but I cannot seem to find >> the VM code. > > Found it :) > > Python/cev

Re: CPython VM & byte code resources wanted

2008-04-08 Thread Aaron Gray
>Bytecodes: >http://docs.python.org/lib/bytecodes.html > >VM: >Python/ceval.c Thanks, Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: CPython VM & byte code resources wanted

2008-04-08 Thread Aaron Gray
"Aaron Gray" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I am looking to study the CPython source code, but I cannot seem to find > the VM code. Found it :) Python/ceval.c > Also is there any where a detailed list of the op

Re: CPython VM & byte code resources wanted

2008-04-08 Thread Arnaud Delobelle
On Apr 8, 9:29 pm, "Aaron Gray" <[EMAIL PROTECTED]> wrote: > Hi, > > I am looking to study the CPython source code, but I cannot seem to find the > VM code. > Also is there any where a detailed  list of the opcodes ? > > Many thanks in advance, > > A

CPython VM & byte code resources wanted

2008-04-08 Thread Aaron Gray
Hi, I am looking to study the CPython source code, but I cannot seem to find the VM code. Also is there any where a detailed list of the opcodes ? Many thanks in advance, Aaron -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-12 Thread Fuzzyman
On Feb 12, 7:49 pm, [EMAIL PROTECTED] wrote: > Fuzzyman: > > > Another interesting little benchmark of CPython and IronPython. Can't > > see the code, but it looks like an implementation of the 11 queens > > problem and IronPython comes out a clear winner on this one.

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-12 Thread bearophileHUGS
Fuzzyman: > Another interesting little benchmark of CPython and IronPython. Can't > see the code, but it looks like an implementation of the 11 queens > problem and IronPython comes out a clear winner on this one. (Looks > like no benchmark for psyco.) If you want a mor

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-12 Thread Fuzzyman
On Feb 5, 5:31 pm, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > saysIronPythonis faster than CPython in 1.6 times. > Is it really true? > If yes, what areIronPythondrawbacks

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-07 Thread Isaac Gouy
On Feb 6, 1:54 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > Isaac Gouy wrote: > > On Feb 5, 11:47 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] schrieb: > > >>> Mike C. Fletcher: > Not sure if Mono also provides a speedup. > >>> There is a set of good benchmarks here, t

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Stefan Behnel
Fuzzyman wrote: > On Feb 5, 7:47 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> Mike C. Fletcher: Not sure if Mono also provides a speedup. >>> There is a set of good benchmarks here, the answer is negative: >>> http://shootout.alioth.debian.org/sandbox/bench

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Stefan Behnel
Isaac Gouy wrote: > On Feb 5, 11:47 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] schrieb: >> >>> Mike C. Fletcher: Not sure if Mono also provides a speedup. >>> There is a set of good benchmarks here, the answer is negative: >>> http://shootout.alioth.debian.org/sandbox/be

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Carsten Haese
On Wed, 2008-02-06 at 13:39 -0800, Fuzzyman wrote: > On Feb 5, 7:47 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] schrieb: > > > > > Mike C. Fletcher: > > >> Not sure if Mono also provides a speedup. > > > > > There is a set of good benchmarks here, the answer is negative: > >

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Fuzzyman
On Feb 5, 6:52 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Jeff wrote: > >IronPythonruns on top of .NET. I would be suspect of any claims that > > it is faster than cPython, just as I would of claims that Stackless or > > Jython are faster. > > Well don't

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Fuzzyman
On Feb 5, 7:47 pm, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > Mike C. Fletcher: > >> Not sure if Mono also provides a speedup. > > > There is a set of good benchmarks here, the answer is negative: > >http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&l

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Isaac Gouy
On Feb 6, 12:04 am, [EMAIL PROTECTED] wrote: > Stefan Behnel: > > > This doesn't look like Mono to me: > >IronPython 1.1 (1.1) on .NET 2.0.50727.42 > > You are right! No. > I think this shows that IronPython isn't faster than > CPython at all :

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread Isaac Gouy
On Feb 5, 11:47 am, Stefan Behnel <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > Mike C. Fletcher: > >> Not sure if Mono also provides a speedup. > > > There is a set of good benchmarks here, the answer is negative: > >http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-06 Thread bearophileHUGS
Stefan Behnel: > This doesn't look like Mono to me: > IronPython 1.1 (1.1) on .NET 2.0.50727.42 You are right! I think this shows that IronPython isn't faster than CPython at all :-) (And it uses more memory). Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Steve Holden
Christian Heimes wrote: > Luis M. González wrote: >> The result is that it runs slighty faster in both, IP and CP, but >> cpython is still faster (around 2x) than ironpython. >> However, when using psyco simply blows everything out of the water... > > CPython is very

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Christian Heimes
Luis M. González wrote: > The result is that it runs slighty faster in both, IP and CP, but > cpython is still faster (around 2x) than ironpython. > However, when using psyco simply blows everything out of the water... CPython is very fast here because it keeps blocks of allocated intege

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Luis M. González
On 5 feb, 14:31, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? > If yes, what are IronPython drawbacks

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread [EMAIL PROTECTED]
uedev.blogspot.com/2008/02/changes-in-air.html > > > (blog of a game developers) > > > says IronPython is faster than CPython in 1.6 times. > > > Is it really true? > > > This is a second time around that IronPython piqued my interest > > sufficiently t

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Istvan Albert
On Feb 5, 4:56 pm, Arnaud Delobelle <[EMAIL PROTECTED]> wrote: > Could it be because .NET doesn't have arbitrary length integer types > and your little benchmark will create lots of integers > 2**32 ? > What is the result if you replace foo(a) with > def foo(a): return sqrt(a) Good observation,

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Arnaud Delobelle
On Feb 5, 8:01 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Feb 5, 12:31 pm, dmitrey <[EMAIL PROTECTED]> wrote: > > > Hi all, > > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > > (blog of a game developers) > > says IronPython is f

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Christian Heimes
dmitrey wrote: > Hi all, > the url http://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? > If yes, what are IronPython drawbacks vs CPython? > And is it possible to us

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Istvan Albert
On Feb 5, 12:31 pm, dmitrey <[EMAIL PROTECTED]> wrote: > Hi all, > the urlhttp://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? This is a second time around that

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Stefan Behnel
[EMAIL PROTECTED] schrieb: > Mike C. Fletcher: >> Not sure if Mono also provides a speedup. > > There is a set of good benchmarks here, the answer is negative: > http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&lang=iron This doesn't look like Mono to me: IronPython 1.1 (

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread bearophileHUGS
Mike C. Fletcher: > Not sure if Mono also provides a speedup. There is a set of good benchmarks here, the answer is negative: http://shootout.alioth.debian.org/sandbox/benchmark.php?test=all&lang=iron Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Jean-Paul Calderone
o be a usable >replacement for CPython, but it will require a lot of developer-years to >get it there, most likely. Actually, PyPy is just about (within a factor of 2 for most things) as fast as CPython right now. A bigger hurdle is the availability of extension modules. > >It would b

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Mike C. Fletcher
dmitrey wrote: > Hi all, > the url http://torquedev.blogspot.com/2008/02/changes-in-air.html > (blog of a game developers) > says IronPython is faster than CPython in 1.6 times. > Is it really true? > On certain platforms, I believe so, for certain types of operations. Not

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Steve Holden
Jeff wrote: > IronPython runs on top of .NET. I would be suspect of any claims that > it is faster than cPython, just as I would of claims that Stackless or > Jython are faster. Well don't be. There are benchmarks that clearly show IronPython as faster for selected tests. Ot

Re: IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread Jeff
IronPython runs on top of .NET. I would be suspect of any claims that it is faster than cPython, just as I would of claims that Stackless or Jython are faster. -- http://mail.python.org/mailman/listinfo/python-list

IronPython vs CPython: faster in 1.6 times?

2008-02-05 Thread dmitrey
Hi all, the url http://torquedev.blogspot.com/2008/02/changes-in-air.html (blog of a game developers) says IronPython is faster than CPython in 1.6 times. Is it really true? If yes, what are IronPython drawbacks vs CPython? And is it possible to use IronPython in Linux? D. -- http

Congratulations to the CPython Developers on an outstanding codebase

2008-01-08 Thread Paddy
It looks a bit like an add for Coverity, but under all that, they seem to have picked Python as one of the OS projects to test with their improved testing software because our developers were so good at working on any "bugs" reported by their earlier tool. Good job guys. http://scan.coverity.com

Re: state of XSLT2/XPath2 or XQuery in CPython

2007-12-26 Thread Christof Hoeke
Stefan Behnel wrote: > Christof Hoeke wrote: >> I was wondering if there is any way to use XSLT2 or maybe even XQuery >> with "normal" CPython. Using Saxon/XSLT2 with Jython is no problem (I >> have not tried Saxon.NET with IronPython but suspect no problem?) but I &

Re: CPython and a C extension using Boehm GC

2007-12-26 Thread MrJean1
rouri wrote: > > > Is it possible to write a Python extension that uses the Boehm garbage > > > collector? > > > I have a C library written that makes use ofboehm-gcfor memory > > > management. To use that, I have to call GC_INIT() at the start of the > > > p

Re: state of XSLT2/XPath2 or XQuery in CPython

2007-12-26 Thread Stefan Behnel
Christof Hoeke wrote: > I was wondering if there is any way to use XSLT2 or maybe even XQuery > with "normal" CPython. Using Saxon/XSLT2 with Jython is no problem (I > have not tried Saxon.NET with IronPython but suspect no problem?) but I > could not find any way to use X

Re: CPython and a C extension using Boehm GC

2007-12-26 Thread MrJean1
r memory > > management. To use that, I have to call GC_INIT() at the start of the > > program that uses the library. Now I want to encapsulate the library > > as a CPython extension. The question is really is that possible? And > > will there be conflicts between the boehm-gc

state of XSLT2/XPath2 or XQuery in CPython

2007-12-26 Thread Christof Hoeke
hi, I was wondering if there is any way to use XSLT2 or maybe even XQuery with "normal" CPython. Using Saxon/XSLT2 with Jython is no problem (I have not tried Saxon.NET with IronPython but suspect no problem?) but I could not find any way to use XSLT2 or XPath Features with CPython

Re: CPython and a C extension using Boehm GC

2007-12-25 Thread Andrew MacIntyre
. Now I want to encapsulate the library > as a CPython extension. The question is really is that possible? And > will there be conflicts between the boehm-gc and Python memory > management? And when should I call GC_INIT? It probably should be possible with some caveats: - memory allocated by Pyt

Re: CPython and a C extension using Boehm GC

2007-12-25 Thread MrJean1
that uses the Boehm garbage > > collector? > > I have a C library written that makes use of boehm-gc for memory > > management. To use that, I have to call GC_INIT() at the start of the > > program that uses the library. Now I want to encapsulate the library > > as a CPyt

Re: CPython and a C extension using Boehm GC

2007-12-25 Thread MrJean1
garbage > collector? > I have a C library written that makes use of boehm-gc for memory > management. To use that, I have to call GC_INIT() at the start of the > program that uses the library. Now I want to encapsulate the library > as a CPython extension. The question is really is

CPython and a C extension using Boehm GC

2007-12-25 Thread malkarouri
library as a CPython extension. The question is really is that possible? And will there be conflicts between the boehm-gc and Python memory management? And when should I call GC_INIT? Best Regards, Muhammad Alkarouri -- http://mail.python.org/mailman/listinfo/python-list

Re: IronPython faster than CPython?

2007-12-19 Thread Ross Ridge
ere are >areas to improve, until I read some articles that say IronPython is a few >times faster. In my limitted experience, IronPython is slower than CPython. I can't actually get much to run with IronPython, but what I have been able to get working runs slower. In particular initializ

Re: IronPython faster than CPython?

2007-12-18 Thread Mark Shroyer
managed code: > > http://www.python.org/~jeremy/weblog/031209a.html > http://blogs.msdn.com/jasonmatusow/archive/2005/03/28/402940.aspx You might argue that Python programs executed using CPython "run on hardware" to a *lesser* extent than they do when run in IronPython. In either c

Re: IronPython faster than CPython?

2007-12-18 Thread John Machin
On Dec 19, 9:18 am, "Jack" <[EMAIL PROTECTED]> wrote: > I learned a lot from the other thread 'Is a "real" C-Python possible?' about > Python performance and optimization. I'm almost convinced that Python's > performance is pretty good for this dynamic language although there are > areas to improve

IronPython faster than CPython?

2007-12-18 Thread Jack
I learned a lot from the other thread 'Is a "real" C-Python possible?' about Python performance and optimization. I'm almost convinced that Python's performance is pretty good for this dynamic language although there are areas to improve, until I read some articles that say IronPython is a few

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread Christian Heimes
grbgooglefan wrote: > How do we resolve this error? The easiest way to solve all your problems is: make altinstall. It installs Python in PREFIX (usually /usr/local). Although it is possible to run Python in a build directory it is tricky and may not work for your own program. Christian -- ht

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread grbgooglefan
On Dec 7, 5:15 pm, Christian Heimes <[EMAIL PROTECTED]> wrote: > grbgooglefan wrote: > > I am compiling CPP program which uses CPython API functions from > > Python 2.5.1 source code > > > First I compiled with this commanline, that time I got "pyconfig.h"

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread Christian Heimes
grbgooglefan wrote: > I am compiling CPP program which uses CPython API functions from > Python 2.5.1 source code > > First I compiled with this commanline, that time I got "pyconfig.h" > not found. On Unix you have to run ./configure and make before you can use a source

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-07 Thread grbgooglefan
On Dec 7, 2:17 pm, grbgooglefan <[EMAIL PROTECTED]> wrote: > On Dec 7, 12:32 pm, grbgooglefan <[EMAIL PROTECTED]> wrote: > > > > > > > I am compiling CPP program which uses CPython API functions from > > Python 2.5.1 source code > > > Fir

Re: Erros when compiling a CPP program which uses CPython API functions

2007-12-06 Thread grbgooglefan
On Dec 7, 12:32 pm, grbgooglefan <[EMAIL PROTECTED]> wrote: > I am compiling CPP program which uses CPython API functions from > Python 2.5.1 source code > > First I compiled with this commanline, that time I got "pyconfig.h" > not found. > g++ -Os -I../../Inc

Erros when compiling a CPP program which uses CPython API functions

2007-12-06 Thread grbgooglefan
I am compiling CPP program which uses CPython API functions from Python 2.5.1 source code First I compiled with this commanline, that time I got "pyconfig.h" not found. g++ -Os -I../../Include ../../libpython2.5.a -lm -ldl -lpthread -lutil testeval.cpp In file included from test

Is Ruby 1.9 going to be faster than CPython?

2007-11-28 Thread Nicola Larosa (tekNico)
Holy Shmoly, Ruby 1.9 smokes Python away! http://antoniocangiano.com/2007/11/28/holy-shmoly-ruby-19-smokes-python-away/ The post is less flaming than the title, fortunately. :-) -- Nicola Larosa - http://www.tekNico.net/ If you have multiple CPUs and you want to use them all, fork off as many pr

Re: PyObject sanitizer (CPython 2.4.4)

2007-11-06 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > I get this from valgrind (no suppression file but thgis probably is > not covered by the suppressor anyway): > ==6108== Invalid read of size 4 > ==6108==at 0x48D19F4: lookdict_string (dictobject.c:359) > ==6108==by 0x48D1B59: PyDict_GetItem (dictobject.c:554) >

PyObject sanitizer (CPython 2.4.4)

2007-11-06 Thread sndive
I get this from valgrind (no suppression file but thgis probably is not covered by the suppressor anyway): ==6108== Invalid read of size 4 ==6108==at 0x48D19F4: lookdict_string (dictobject.c:359) ==6108==by 0x48D1B59: PyDict_GetItem (dictobject.c:554) ==6108==by 0x48B1657: instance_geta

Announcement: Project to get some CPython C extensions running under IronPython

2007-10-12 Thread Giles Thomas
The great thing about CPython is that it comes with the batteries included. The problem with IronPython is that some of these batteries just don't fit - in particular, most of the the C extensions don't work. We'd like to help fix at least some of this problem, to help

Re: cpython list __str__ method for floats

2007-09-12 Thread John Machin
On Sep 12, 10:59 pm, Duncan Booth <[EMAIL PROTECTED]> wrote:> [snip] > I believe the claim is that using the full 17 digits ensures the round- > tripping works even if you serialise and deserialise on different > systems, so perhaps we all pay a cost in our interactive sessions for > something wh

Re: cpython list __str__ method for floats

2007-09-12 Thread Duncan Booth
3)*10-3 7.1054273576e-015 These values will still roundtrip to the exact same internal representations. BTW, I didn't have to work too hard to figure out what that last value should be, the first is cut/paste from CPython, the second is what IronPython gives you. I believe the claim is that

Re: cpython list __str__ method for floats

2007-09-12 Thread Bjoern Schliessmann
[david] wrote: > Leaving aside the question of why str should return repr, str doesn't "return" repr. str returns a "nice string representation" of an object. This "nice string representation" of a list is the opening square bracket, the repr of its contents seperated by comma, and the closing sq

Re: cpython list __str__ method for floats

2007-09-11 Thread [david]
Bjoern Schliessmann wrote: > [david] wrote: >> returns poorly formatted values: > > Please explain. > >> >>>str(13.3) >> '13.3' >> >>>str([13.3]) >> '[13.301]' > > This is quite a FAQ. > > str of a float returns the float, rounded to decimal precision. > > str of a list returns a

Re: cpython list __str__ method for floats

2007-09-11 Thread Bjoern Schliessmann
[david] wrote: > returns poorly formatted values: Please explain. > >>>str(13.3) > '13.3' > >>>str([13.3]) > '[13.301]' This is quite a FAQ. str of a float returns the float, rounded to decimal precision. str of a list returns a square brackets enclosed enumeration of the content

Re: cpython list __str__ method for floats

2007-09-11 Thread TheFlyingDutchman
On Sep 11, 4:07 am, "[david]" <[EMAIL PROTECTED]> wrote: > returns poorly formatted values: > > >>>str(13.3) > '13.3' > >>>str([13.3]) > '[13.301]' > > [david] There is some difference in the way repr() and str() convert floats to strings: >>> a = 13.3 >>> print str(a) 13.3 >>> prin

cpython list __str__ method for floats

2007-09-11 Thread [david]
returns poorly formatted values: >>>str(13.3) '13.3' >>>str([13.3]) '[13.301]' [david] -- http://mail.python.org/mailman/listinfo/python-list

Secured CPython interpreter in embedded situations

2007-06-20 Thread Brett C.
. If you have a use for a secured CPython interpreter then please have a look (although the work generalizes to the language, I implemented it in CPython since that is what I know best). This work is not about replacing rexec, though! It secures the entire interpreter and is not about running some

CPython vs. Jython/JPython

2007-04-28 Thread Sean McCallister
Is this stephen coursen, once married to michelle coursen from linden NJ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Possible to set cpython heap size?

2007-02-23 Thread Tony Nelson
In article <[EMAIL PROTECTED]>, "Andy Watson" <[EMAIL PROTECTED]> wrote: ... > If I could have a heap that is larger and does not need to be > dynamically extended, then the Python GC could work more efficiently. ... GC! If you're allocating lots of objects and holding on to them, GC will ru

Re: Possible to set cpython heap size?

2007-02-23 Thread Andrew MacIntyre
haven't even looked at Python memory management internals since 2.3, > and not in detail then, so I'm sure someone will correct me in the > case that I am wrong. > > However, I believe that this is almost exactly how CPython GC does not > work. CPython is refcounted wit

Re: Possible to set cpython heap size?

2007-02-22 Thread Martin v. Löwis
Andy Watson schrieb: > I have an application that scans and processes a bunch of text files. > The content I'm pulling out and holding in memory is at least 200MB. > > I'd love to be able to tell the CPython virtual machine that I need a > heap of, say 300MB up front ra

Re: Possible to set cpython heap size?

2007-02-22 Thread Chris Mellon
#x27;m sure someone will correct me in the case that I am wrong. However, I believe that this is almost exactly how CPython GC does not work. CPython is refcounted with a generational GC for cycle detection. There's a memory pool that is used for object allocation (more than one, I think, fo

Re: Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
On Feb 22, 10:53 am, a bunch of folks wrote: > Memory is basically free. This is true if you are simply scanning a file into memory. However, I'm storing the contents in some in-memory data structures and doing some data manipulation. This is my speculation: Several small objects per scanned

Re: Possible to set cpython heap size?

2007-02-22 Thread Jussi Salmela
Andy Watson kirjoitti: > I have an application that scans and processes a bunch of text files. > The content I'm pulling out and holding in memory is at least 200MB. > > I'd love to be able to tell the CPython virtual machine that I need a > heap of, say 300MB up front ra

Re: Possible to set cpython heap size?

2007-02-22 Thread Chris Mellon
hly how much memory I'm going > to need, and cpython seems to be taking a fair amount of time > extending its heap as I read in content incrementally. > To my knowledge, no modern OS actually commits any memory at all to a process until it is written to. Pre-extending the heap would eit

Re: Possible to set cpython heap size?

2007-02-22 Thread Irmen de Jong
Andy Watson wrote: > > Why do you want that? And no, it is not possible. And to be honest: > I have >> no idea why e.g. the JVM allows for this. >> >> Diez > > The reason why is simply that I know roughly how much memory I'm going > to need, and cpython

Re: Possible to set cpython heap size?

2007-02-22 Thread Diez B. Roggisch
Andy Watson wrote: > > Why do you want that? And no, it is not possible. And to be honest: > I have >> no idea why e.g. the JVM allows for this. > > The reason why is simply that I know roughly how much memory I'm going > to need, and cpython seems to be taking a fa

Re: Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
> Why do you want that? And no, it is not possible. And to be honest: I have > no idea why e.g. the JVM allows for this. > > Diez The reason why is simply that I know roughly how much memory I'm going to need, and cpython seems to be taking a fair amount of time extending its

Re: Possible to set cpython heap size?

2007-02-22 Thread Diez B. Roggisch
Andy Watson wrote: > I have an application that scans and processes a bunch of text files. > The content I'm pulling out and holding in memory is at least 200MB. > > I'd love to be able to tell the CPython virtual machine that I need a > heap of, say 300MB up front ra

Possible to set cpython heap size?

2007-02-22 Thread Andy Watson
I have an application that scans and processes a bunch of text files. The content I'm pulling out and holding in memory is at least 200MB. I'd love to be able to tell the CPython virtual machine that I need a heap of, say 300MB up front rather than have it grow as needed. I

Re: call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Mathias Panzenboeck
Anthony Baxter wrote: > On 12/13/06, Holger Joukl <[EMAIL PROTECTED]> wrote: >> I did read this but didn't think it applied to my situation. I'm quite >> sure that the refcount of the local variable is 1 before the local scope >> is left. >> So let me rephrase the question: Even if I can make sure

Re: Re: call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Anthony Baxter
On 12/13/06, Holger Joukl <[EMAIL PROTECTED]> wrote: > I did read this but didn't think it applied to my situation. I'm quite > sure that the refcount of the local variable is 1 before the local scope > is left. > So let me rephrase the question: Even if I can make sure that non of the > problemati

Re: Re: call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Holger Joukl
[EMAIL PROTECTED] schrieb am 13.12.2006 11:09:13: > Holger Joukl wrote: > > > Anyway: Is relying on __del__ getting called immediately when the refcount > > drops to 0 a no-no? > > yes, but more importantly, relying on the refcount dropping to 0 when > something goes out of scope is a major no-no.

Re: call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Fredrik Lundh
Holger Joukl wrote: > Anyway: Is relying on __del__ getting called immediately when the refcount > drops to 0 a no-no? yes, but more importantly, relying on the refcount dropping to 0 when something goes out of scope is a major no-no. > If so should that maybe be prominently stated in the docs?

call of __del__ non-deterministic in python 2.4 (cpython)?

2006-12-13 Thread Holger Joukl
Hi all, I've recently run into a problem that I haven't seen with python 1.5.2 and python 2.3. It seems that under certain conditions __del__ does not get immediately called when a local variable goes out of scope. I ended up with deadlocks in a threaded application because a locked section was

Re: CPython keeps on getting faster

2006-09-10 Thread George Sakkis
osoft Corporation. All rights reserved. > >>> str is unicode > True This might also explain in part the relative slowness you noticed. OTOH, IronPython on Mono is around 20% faster than cPython 2.4 and 2.5c1 running pystone on my laptop (~50K pystones/sec for IronPython, ~41K pysto

CPython keeps on getting faster

2006-09-10 Thread John Machin
Here are some data points that illustrate the improvement in speed since 2.1 for one (probably atypical) application: rummaging through a 120MB Microsoft Excel spreadsheet file using the xlrd package. The time shown is the number of seconds required to open the file and parse out all data content

<    1   2   3   4   5   6   7   >