After writing the python module, how to write the documentation?
黄舟
黄舟 2017-05-24 11:35:07
0
3
624

I am a newbie and have never released a python program before.
Recently, the teacher asked me to write two small python modules, one is to convert pdf to txt, and the other is to calculate the similarity of the converted txt document. I have written it and know how to package it into a third-party library, but I don’t know how to write the supporting documentation?
I also checked on the Internet, and some people said that the content in the comment is the document (I wrote this comment carefully), but I don’t know if I need to put a txt file in the package and write How about writing down the usage of different functions in different modules?
Thank you everyone, I really don’t know how to do this document...

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(3)
Ty80

sphinx

仅有的幸福

I guess you have also used git, which is similar to the readme file in git project. Look at how the two open source projects are written. The purpose of writing the readme is probably to help others know what the project is, what it can do, and how to use it. Please pay attention. Main points, almost enough sauce

漂亮男人

Example:

模块.py

'''
这是模块文档
'''
pass
>>> import 模块
>>> help(模块)
Help on module 模块:

NAME
    模块 - 这是模块文档

FILE
    d:\python34\模块.py


>>> 
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template