Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Feb 23, 2009
  1. Make a copy of the Python version string. While the string itself is

    authored
    constant, we cannot guarantee its immutability once we return it inside
    of a zval.
Commits on Oct 4, 2008
  1. Implementing initial support for intercepting Python streams. By defa…

    authored
    …ult,
    
    we now intercept sys.stdout and sys.stderr.  The former is redirected into
    PHP's output stream while the latter results in E_NOTICE errors.
Commits on Sep 24, 2008
  1. Because python_exec() is prototyped to return a bool, we should retur…

    authored
    …n false
    
    on all errors (instead of null).
Commits on Sep 22, 2008
  1. Registering a PHP_PYTHON_VERSION constant that contains the extension's

    authored
    version string.  We use this in our shell example.
  2. Updating the extension's version number of removing the CVS Revision …

    authored
    …string
    
    from the "info" output.  The latter isn't very useful because the extension
    is comprised of mulitple source files.
  3. Appending a newline to the end of the copyright block string to improve

    authored
    the command line ('php -i') output.
Commits on Sep 19, 2008
  1. python_version() now grabs the thread state before touching the Pytho…

    authored
    …n C API.
    
    python_error() now asserts the thread state before touching the Python C API.
Commits on Sep 17, 2008
  1. Implementing support for per-request interpreter state. This is tracked

    authored
    using a thread state request global.  Each interpreter thread is basically
    its own Python environment within the global Python process.
    
    This prevents Python environment "pollution" between multiple requests and
    allows us to implement interesting features like stdout/stderr redirection.
    It also allows us to run more efficiently (and correctly!) in multithreaded
    (i.e. ZTS) environments.
Commits on Mar 4, 2008
  1. Cast the result of Py_Version() to a char* to avoid a compilation war…

    authored
    …ning.
    
    The result is truly const, however, which allows us to avoid duplicating
    the string value here.
Commits on Feb 16, 2008
  1. Adding the start of a new PHP module (for accessing PHP state from wi…

    authored
    …thin the
    
    embedded Python environment).
Commits on Oct 19, 2007
  1. Python objects are now compatible with PHP's standard object interfac…

    authored
    …e. This
    
    allows them to be used with a wider range of existing PHP functions (such as
    get_object_vars()).
Commits on Oct 13, 2007
  1. TSRM build fixes

    authored
Commits on Jul 1, 2007
Commits on Jun 28, 2007
  1. Rewriting all of the Python-to-PHP type conversion functions for impr…

    authored
    …oved
    
    efficiency and error handling.  All of these functions now return a status
    code and assign their result to a pre-allocated / pre-initialized zval*.
Commits on Jun 26, 2007
  1. Rewriting python_exec() directly in terms of PyRun_String() so that w…

    authored
    …e can
    
    perform our own error reporting.  (PyRun_SimpleString() uses Pythons error
    printing routines internally.)
    
    The implementations of python_eval() and python_exec() are now quite
    similar, differing only in how they handle return values.  They may be
    merged into a single routine in the future.
  2. We now distinguish between "evaluating" an expression and "executing" a

    authored
    command string.  The former is handled by the python_eval() function and
    the latter by the (new) python_exec() function.
Commits on Jan 2, 2006
  1. Prefer php_error() to zend_error(), use Py_XDECREF() when the Python …

    authored
    …object
    
    may be NULL, free our string references in python_error(), and correct some
    whitespace.
  2. Bringing the Python extension up to date with the latet PHP object APIs.

    authored
    This round of work also includes a rather large number of iterative
    improvements to the previous code brought about by both my increased
    understanding of PHP object internals and the benefit of having a working
    codebase on which to iterate and improve.  A two year break from the code
    didn't hurt much, either.
    
    There is still quite a bit to be done before this code can emerge from its
    current 'alpha' state, but it's starting to shape up rather nicely.  A lot
    of functionality is still missing, however, so I wouldn't consider any of
    this to actually be usable at this state, though.
    
    At the moment, only the "embedded Python" code has been reborn.  The Python
    PHP extension module (i.e., the code which gives the embedded Python
    environment access to the PHP runtime) still needs to be rewritten.
    
    At the moment, I'm only developing in a Win32 environment.  I'll test the
    Unix build some time soon once I feel like tinkering with it.  I don't
    expect there to be particularly broken there, however, aside from perhaps
    the build infrastructure itself.
    
    In addition to the source-level changes, I've also relicensed this
    extension under an MIT License.
Commits on Jan 13, 2004
  1. Initial rewrite of the Python extension for PHP5 / Zend Engine 2.

    authored
    This is still very much a work-in-progress.
Commits on Jan 12, 2003
  1. Update TODO list.

    authored
Commits on Dec 23, 2002
  1. Correct a long-standing copy-n-paste error that prevented the Python …

    authored
    …extension
    
    from loading under Windows.
Commits on Nov 18, 2002
  1. - Store Python object handles as resources instead of integers.

    authored
    - Capitalize the name of the Python class (used to be "python").
    - Prefer zval to pval for consistency.
Commits on Nov 17, 2002
  1. - Added pip_args_to_tuple() / pips_args_to_tuple_ex() argument conver…

    authored
    …sion
    
      functions.
    - Use these functions to convert variable PHP function arguments to Python
      argument tuples.
    - Python functions now accept a variable list of arguments instead of a
      discrete array of argument.  Passing an array of arguments no longer
      yields the expected result.
Commits on Oct 21, 2002
  1. - Improve the phpinfo() output by adding the extension version, INI

    authored
      directives, and Python copyright.
    - Add a few more TODO items.
Commits on Oct 15, 2002
  1. - Fix a crash bug on Python to PHP string conversions. I wrote ZVAL_S…

    authored
    …TRING
    
      where I had intended ZVAL_STRINGL, but I ended up having that syntax wrong,
      too.
    - Change the way that python_attribute_handler's return value is handled.
    - Correct some comments.
  2. A lot of new work on the Python extension:

    authored
     - Split python.pythonpath into python.prepend_path and python.append_path
     - Added py_path(), py_path_prepend(), and py_path_append()
     - Added py_import(), which imports a module into the Python environment
     - Added py_call(), which calls a function in a given Python module
     - Corrected the conversion of None values from Python
     - Added tests for all of the above
Commits on Oct 13, 2002
  1. - Finish implementation of the python.pythonpath INI option

    authored
    - Add some more TODO items
    - Return NULL for Python None objects
Something went wrong with that request. Please try again.