简体   繁体   中英

python IDE for auto-complete Docstring

I am looking for a Python IDE which can generate the docstrings framework for me automatically. For example:

def GetTextByCtrlName(self, _hwnd, _ctrName):
        '''
        @desc:

        @param:
             _hwnd 
             _ctrName  
        '''

Then I can just fill the corresponding content.

PyCharm has supported this since version 1.5.

First, configure the format you want the docstring to be generated. Hit CTRL + ALT + S (on Windows), select the format in Project Settings > Python Integrated Tools.

Your choices are plain, Epydoc or reStructuredText

Once that is configured, make sure your cursor is on the method name and press Alt + Enter .

You could use a tool like Sphinx . It's designed to specifically document python code, although it doesn't offer a friendly IDE integration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM