Great thanks for you advices! I tried to use the module for the lib in pypy/modules, but observed the following errors from the tests:
Exception: object with a __call__ is not RPython: <built-in function test_func> The function test_func is the function from the new built module. >From PyPy document, I saw that RPython is a subset of Python and more strict in syntaxt, but did not find details introduction on RPython. What is the possible casue to the error? And where we could find some syntax introductions on RPython. On Thu, May 28, 2015 at 7:50 PM, Maciej Fijalkowski <fij...@gmail.com> wrote: > you likely don't want to compile pypy each time you change anything. > Consider writing tests or using pyinteractive.py > > On Thu, May 28, 2015 at 1:46 PM, Yicong Huang <hengha....@gmail.com> > wrote: > > Oh, I found out I should use the correct pypy(and .so) to run the python > > script. > > In previous test, "pypy test.py" point to the old one without the new > > module. > > Using the new built pypy, the result is good. > > > > On Thu, May 28, 2015 at 6:31 PM, Yicong Huang <hengha....@gmail.com> > wrote: > >> > >> Hi, > >> > >> I tried to write a simple test module in pypy: > >> 1. Make a new directory in pypy/modules, and put the code there. > >> 2. Add the new module name in pypyoption.py and built the new > libpypy-c.so > >> > >> The reason that I put the module in pypy/modules is I tried to make the > >> module build into libpypy-c.so. :) > >> > >> After that, in pypy console, I am able to import the module and run > >> module's function. > >> However, when I tried to import the module in python script, I met the > >> errors: > >> > >> pypy test.py > >> > >> Traceback (most recent call last): > >> File "<builtin>/app_main.py", line 75, in run_toplevel > >> File "test.py", line 1, in <module> > >> import pypytest > >> ImportError: No module named pypytest > >> > >> Any steps I missed to make the buitin module visible? > >> > >> > > > > > > _______________________________________________ > > pypy-dev mailing list > > pypy-dev@python.org > > https://mail.python.org/mailman/listinfo/pypy-dev > > >
_______________________________________________ pypy-dev mailing list pypy-dev@python.org https://mail.python.org/mailman/listinfo/pypy-dev