PyPy, is it a 1:1 replacement for CPython?

Discussion in 'Python' started by Simon Cropper, Jul 21, 2012.

  1. Hi,

    Can you use PyPy as a direct replacement for the normal python or is it
    a specialized compiler that can only work with libraries that are
    manipulated to operate within its constraints (if it has any).

    Are there any issues with using PyPy? For example, if programs are
    created under PyPy are they subtle different from normal code that would
    make the program incompatible with the normal compiler?

    --
    Cheers Simon

    Simon Cropper - Open Content Creator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction http://www.fossworkflowguides.com
    GIS Packages http://www.fossworkflowguides.com/gis
    bash / Python http://www.fossworkflowguides.com/scripting
    Simon Cropper, Jul 21, 2012
    #1
    1. Advertising

  2. On Sat, 21 Jul 2012 13:35:21 +1000, Simon Cropper wrote:

    > Hi,
    >
    > Can you use PyPy as a direct replacement for the normal python or is it
    > a specialized compiler that can only work with libraries that are
    > manipulated to operate within its constraints (if it has any).


    PyPy should work perfectly with pure-Python software. I don't know if it
    is compatible with extension libraries written in C or Fortran.


    > Are there any issues with using PyPy? For example, if programs are
    > created under PyPy are they subtle different from normal code that would
    > make the program incompatible with the normal compiler?


    I don't expect so. There may be special PyPy functions that other
    Python's won't have, but I don't know of any. If you stick to standard
    library and language features as described in the normal Python docs, you
    should be fine.


    --
    Steven
    Steven D'Aprano, Jul 21, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. holger krekel
    Replies:
    0
    Views:
    329
    holger krekel
    Sep 8, 2003
  2. Armin Rigo

    PyPy: sprint and news

    Armin Rigo, Oct 26, 2003, in forum: Python
    Replies:
    0
    Views:
    320
    Armin Rigo
    Oct 26, 2003
  3. Borcis
    Replies:
    1
    Views:
    372
    Borcis
    Dec 22, 2003
  4. Alec Taylor
    Replies:
    0
    Views:
    121
    Alec Taylor
    Jul 21, 2012
  5. Terry Reedy
    Replies:
    0
    Views:
    111
    Terry Reedy
    Jul 21, 2012
Loading...

Share This Page