https://bugs.gpodder.org/show_bug.cgi?id=435
--- Comment #11 from Thomas Perl <[email protected]> 2010-06-28 14:31:52 BST --- (In reply to comment #10) > Created an attachment (id=505) --> (https://bugs.gpodder.org/attachment.cgi?id=505) [details] > user extensions v3 What's the point in having a separate "Open()" method in the "userext" module? You could just call the constructor of the "userext" class with the same parameter. Also, the class name "userext" does not conform to PEP-8. May I suggest you change the module "gpodder.userext" to "gpodder.extensions" and the class "userext" to "ExtensionManager" or something. Instead of: + path = os.path.join(gpodder.home, 'extensions') + if os.path.exists(path): + for name in os.listdir(path): + if name.endswith('.py'): You could write something along the lines of: extensions = os.path.join(gpodder.home, 'extensions', '*.py') for filename in glob.glob(extensions): print filename The class "hooks" in the extension scripts themselves should also have a PEP-8 conformant name. Something like "Extension" sounds okay and easy to understand. Maybe you can also provide an empty extension_example.py file in doc/dev/ that has the basic structure in place and can be used by users to add data there. -- Configure bugmail: https://bugs.gpodder.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes. _______________________________________________ gPodder-Bugs mailing list [email protected] https://lists.berlios.de/mailman/listinfo/gpodder-bugs
