Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-02-07 Thread Armin Rigo
Hi Frank, On 6 February 2017 at 20:17, Frank Wang wrote: > Is there a way to distinguish in a mixed module function, e.g. len, whether > the function is being called from the application or interpreter? Right now, > I'm modifying len to print out information about an interpreter level > object, b

Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-02-06 Thread Frank Wang
Hi, Is there a way to distinguish in a mixed module function, e.g. len, whether the function is being called from the application or interpreter? Right now, I'm modifying len to print out information about an interpreter level object, but I only want it to print out when it's being called by an ap

Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-01-27 Thread Frank Wang
Hi Carl, Thanks for the information! I just have to do it for a specific attribute. It is just a bit tedious as you said, making sure the semantics of the parameter type and result conversion work properly is a bit tricky. Frank On Fri, Jan 27, 2017 at 11:35 AM, Carl Friedrich Bolz wrote: >

Re: [pypy-dev] Modifying Interpreter-level Object from Application

2017-01-27 Thread Carl Friedrich Bolz
Hi Frank, no, unfortunately there's not really a shortcut to exposing the methods, functions and attributes via a mixed module, because you need to think about the semantics of parameter type and result conversion for every such function anyway. Do you have trouble to get it to work at all? Or is

[pypy-dev] Modifying Interpreter-level Object from Application

2017-01-27 Thread Frank Wang
Hi, At the application level, I want to modify some interpreter-level attributes of an object. Right now, I have the interpreter level functions that allow me to modify the interpreter object. Is the easiest way to have an application access interpreter level attributes to use a Mixed Module with