dimanche 1 février 2015

GPL location in Python source


Besides the COPYING file, to also follow the how-to advice of GPL describing "adding two elements to each source file of your program" (copyright notice and permission), "right near the top of each file", and keep the license out of the pydoc or generated documentation, is there a convention for Python source code?


My experiment shows that if you use hash (#) comments for the license as the first lines, followed by triple-quote (''') module description, the license correctly doesn't show up using pydoc. Is this about right for the very first lines of the file:



# License goes here,
# use multiple lines
'''
Short description here

Module full description using multiple paragraphs here.
'''




Aucun commentaire:

Enregistrer un commentaire