I recently moved to PyPy. It's amanzingly fast, but a lot of python libraries are not implemented yet. So I got a lot of home made python functions that I'd like to call within the PyPy code.
Here's my question: is there a way to call a python file or function within PyPy, and passing it some arguments ?
A code example:
I got a python module named python_code.py using a library not supported by PyPy, matplotlib for instance.
import matplotlib as mp
def my_custom_ploting_function(*args,**kwargs):
some code
and I'd like to create a PyPY module named pypy_code.py like this:
from python_code import my_custom_ploting_function
def my_custom_pypy_ploting_function(*args,**kwargs):
my_custom_ploting_function(*args,**kwargs)
But this code won't work, because PyPy cannot import the python_code module, because it thus will try to import matplotlib (which is not supported by PyPy).
sys.argvwith PyPY for commandline arguments. Or do you mean something else? It's not at all clear to me what exactly you're asking. - Martin Tournoij