Commits

Anonymous committed 6913282

support older and newer versions of pymacs
(the ones that have Pymacs/pymacs.py and ones that have only Pymacs.py instead)

original patch by leoliu

Comments (0)

Files changed (1)

ropemacs/__init__.py

     while frame:
         # checking frame.f_code.co_name == 'pymacs_load_helper' might
         # be very fragile.
-        if inspect.getfile(frame).rstrip('c').endswith('pymacs.py'):
+        filename = inspect.getfile(frame).rstrip('c')
+        if filename.endswith(('Pymacs.py', 'pymacs.py')):
             return True
         frame = frame.f_back