Hello, I would like to be able to use wxPython on PyPy.
I think some of you might be wondering why we should try to make wxPython run on PyPy. It gives us almost native speed. This means future wxPython programs could run much faster than they do now.
Example benchmark program:
def calculate_prime_numbers(highest_number):
is_prime = False
print(2),
for n in range(3, highest_number):
is_prime = True
for x in range(2, n - 1):
if n % x == 0:
is_prime = False
break
if is_prime == True:
print (n),
calculate_prime_numbers(100000)
This program calculates and displays all the prime numbers from 2 to 100,000. In regular Python (CPython) it takes 48.7 seconds to execute. Take the same program and run it in PyPy and execution time goes all the way down to 1.5 seconds. Try it yourself if you wish.
Why hasn’t wxPython been ported over to PyPy yet?
I think there are several reasons. One is a lack of organization. There is no official web site for supporting wxPython with PyPy. People have no where to go to find documentation on running wxPython on PyPy. Documentation can really help others to learn how he or she could help contribute to this cause. There is also no explanation on how wxPython would work in PyPy. Another reason is most people may not be aware that PyPy exists or even know what is its purpose. It would probably take a team of people to do the work. So far only a few individuals have tried.
Past attempts…
I have read a few post from people have did try to port wxPython over to PyPy. Here is one: building from source with PyPy. He reports having bad documentation, crashes, and code we could try. The link to his code is now dead.
How wxPython would work in PyPy (or what needs to be done)?
Currently I think it might work like this. Python calls will go thru CFFI to wxWidgets. So this:
PyPy <-> CFFI <-> wxWidgets
What I think should be done is an official website be made for running wxPython in PyPy. My suggestion is to use Sourceforge. It has a full forum for users to talk to each other, a file download section, and a ticketing system. If anyone has a better idea please let me know. I would like to make it as easy as possible for others to contribute.
Thank you.