Python module generator for github
I'm newbie to pytho开发者_如何学Pythonn and it's philosophy. I'm trying to develop a module on github. Is there any Ruby's gem generator like tool for developing module? How to develop a module? Thank you for any advise.
You don't need a tool to create a python module, any filename ending in .py
is sufficient. A package, which is a collection of modules, is similarly created by the presence of a file named __init__.py
in the same folder as other modules (and possibly other packages). The __init__.py
file can be empty or not, your choice.
Best practices dictate that importing a module should have no side effects; It should define classes and functions, but take no action. python modules should start with a docstring explaining the purpose of the module and how it should be used.
精彩评论