Thought JFTHOI I would try pypy on the simplest demo:

[18:05 ~/src/Python-2.7.2/Demo/tkinter/matt]$ cat -n 00-HELLO-WORLD.py
     1  from Tkinter import *
     2
     3  # note that there is no explicit call to start Tk.
     4  # Tkinter is smart enough to start the system if it's not already going.
     5
     6  class Test(Frame):
     7      def printit(self):
     8          print "hi"py
     9
    10      def createWidgets(self):
    11          self.QUIT = Button(self, text='QUIT', foreground='red',
    12                             command=self.quit)
    13
    14          self.QUIT.pack(side=LEFT, fill=BOTH)
    15
    16          # a hello button
    17          self.hi_there = Button(self, text='Hello',
    18                                 command=self.printit)
    19          self.hi_there.pack(side=LEFT)
    20
    21      def __init__(self, master=None):
    22          Frame.__init__(self, master)
    23          Pack.config(self)
    24          self.createWidgets()
    25
    26  test = Test()
    27  test.mainloop()
[18:05 ~/src/Python-2.7.2/Demo/tkinter/matt]$ pypy 00-HELLO-WORLD.py
pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required 
by pypy)
pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by 
pypy)
Traceback (most recent call last):
  File "app_main.py", line 53, in run_toplevel
  File "00-HELLO-WORLD.py", line 1, in <module>
    from Tkinter import *
  File 
"/home/bokr/pypy/pypy-c-jit-43780-b590cf6de419-linux/lib-python/2.7/lib-tk/Tkinter.py",
 line 39, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
[18:05 ~/src/Python-2.7.2/Demo/tkinter/matt]$

I guess my "Python may not be configured for Tk" ;-)

Is there an easy fix for this? I built my pypy from source, using the simplest
config/make/install as specified in the tarball -- IIRC:

[18:05 ~/src/Python-2.7.2/Demo/tkinter/matt]$ pypy --version
pypy: /usr/lib/libcrypto.so.0.9.8: no version information available (required 
by pypy)
pypy: /usr/lib/libssl.so.0.9.8: no version information available (required by 
pypy)
Python 2.7.1 (b590cf6de419, Apr 30 2011, 02:00:38)
[PyPy 1.5.0-alpha0 with GCC 4.4.3]

Also a fix for the crypto / ssl messages, one way or another?
Did I just miss some config options? Sorry to be so lazy and just ask ;-/
Decided to send it anyway ...

Regards,
Bengt Richter

_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to