#43 Pmw 2.0.0-rc1 incompatible with pymol svn r4042


The current Pmw2-2.0.0-rc1 release breaks pymol svn at r4042 as reported in https://sourceforge.net/p/pymol/bugs/140/ when both are built against python 2.7. While appending...

import sys, Tkinter
sys.modules['tkinter'] = Tkinter

to pymol's /sw/lib/python2.7/site-packages/pmg_tk/PMGApp.py eliminates the error...

Traceback (most recent call last):
File "/sw/lib/python2.7/site-packages/pymol/init.py", line 447, in launch_gui
File "/sw/lib/python2.7/site-packages/pmg_tk/init.py", line 22, in
from PMGApp import *
File "/sw/lib/python2.7/site-packages/pmg_tk/PMGApp.py", line 33, in
class PMGApp(Pmw.MegaWidget):
File "/sw/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/lib/PmwLoader.py", line 131, in getattr
File "/sw/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/lib/PmwLoader.py", line 89, in _initialise
raise ImportError(msg)
ImportError: No module named tinter

this failure is converted to...

Traceback (most recent call last):
File "/sw/lib/python2.7/site-packages/pmg_tk/init.py", line 35, in run
File "/sw/lib/python2.7/site-packages/pmg_tk/PMGApp.py", line 328, in init
File "/sw/lib/python2.7/site-packages/pmg_tk/PMGApp.py", line 254, in runSkin
File "/sw/lib/python2.7/site-packages/pmg_tk/skins/normal/init.py", line 3629, in setup
File "/sw/lib/python2.7/site-packages/pmg_tk/skins/normal/init.py", line 3602, in createInterface
self.balloon = Pmw.Balloon(self.root)
File "/sw/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/lib/PmwBalloon.py", line 28, in init
Pmw.MegaToplevel.init(self, parent)
File "/sw/lib/python2.7/site-packages/Pmw/Pmw_2_0_0/lib/PmwBase.py", line 982, in init
super().init(parent, tkinter.Toplevel)
TypeError: super() takes at least 1 argument (0 given)

which seems to be an error within Pmw2's /PmwBase.py.


  • Adrian

    Adrian - 2013-09-24


    Thanks for the update. PMW 2.0 is the Python 3.0 port of Pmw 1.3.3 so a lot of the syntax is not Python 2 compatible; you should try the Pmw 1.3.3b version for Python 2. Please tell me if that works.

  • Jack Howarth

    Jack Howarth - 2013-09-24

    There are no issues using pymol svn with Pmw 1.3.3b. However https://fuhm.net/super-harmful/ seems to suggest the calling super without arguments can be problematic.

  • Adrian

    Adrian - 2013-09-24


    I'm glad to hear 1.3.3b is working. I gave the article a look but it seems to be aimed at Python2 and regards some special cases. Pmw 1.3.3b uses super() in the same way it has always been - so far it worked correctly.

    The new argument-less super() works in the Python 3 version and has been implemented after a PEP: http://www.python.org/dev/peps/pep-3135/ recommending the implementation of such syntactic sugar.

    I'll keep monitoring for bug reports. One thing I forgot to do is to add a check for the python version - I've placed it on my to do list for the upcoming release.

    Thanks for the feedback. If 1.3.3b works well, I'll consider this problem solved.

  • Adrian

    Adrian - 2013-09-26
    • status: open --> closed-invalid
    • assigned_to: Adrian
    • Group: -->

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks