Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] PythonLayer takes parameters by string and better exception handling #2001

Closed
wants to merge 5 commits into from

Commits on Mar 31, 2015

  1. Error in python can be shown

    Now we can keep the exception information on Python interpreter. This is
    usefull if you are working on Python interface. You can catch the right
    Exception class when error occurs in your `PythonLayer`. Now we don't
    use `PyErr_Print` that clears exceptions. We use `PyErr_Fetch` to get
    the information and `PyErr_Restore` to restore the exceptions back. And
    I find that `bp::import` or `bp::object::attr` breaks Python interpreter
    if a module or an attribute doesn't exist. We now use `bp::exec` and
    `bp::eval` to keep Python interpreter working even after errors occur. I
    got the hint from the following page.
    
    http://boost.2283326.n4.nabble.com/embedded-python-td2702335.html
    
    And I also modified to use `bp::object` for `self_` member.
    tnarihi committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    80c4a9c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38ddc14 View commit details
    Browse the repository at this point in the history
  3. Check injections in PythonLayer

    * Modified Makefile to link boost_regex for PythonLayer.
    * Travis installs boost_regex
    * Add a note of a new dependency boost_regex on Makefile.config.example
    tnarihi committed Mar 31, 2015
    Configuration menu
    Copy the full SHA
    bf5de76 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    471e71d View commit details
    Browse the repository at this point in the history

Commits on Apr 8, 2015

  1. Configuration menu
    Copy the full SHA
    7b96527 View commit details
    Browse the repository at this point in the history