Commits

Georg Brandl committed ba2cda2

Fix #544: allow .pyw extension for importable modules.

  • Participants
  • Parent commits 6bd624e

Comments (0)

Files changed (1)

File sphinx/util/__init__.py

     lfilename = filename.lower()
     if lfilename.endswith('.pyo') or lfilename.endswith('.pyc'):
         filename = filename[:-1]
+        if not path.isfile(filename) and path.isfile(filename + 'w'):
+            filename += 'w'
     elif not (lfilename.endswith('.py') or lfilename.endswith('.pyw')):
         raise PycodeError('source is not a .py file: %r' % filename)
     if not path.isfile(filename):