mzGUI_standalone.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:multiplierz 作者: BlaisProteomics 项目源码 文件源码
def text_input(prompt='', value='', title=''):
    """Provides a text input dialog and returns the user input

    The value field can be used to enter the default initial value.

    Example:
    >> textInput('Enter your name:', title='Name')

    """

    try:
        dlg = wx.TextEntryDialog(None, message=prompt, caption=title, defaultValue=value)
    except wx._core.PyNoAppError:
        app = mzApp()
        app.launch()
        dlg = wx.TextEntryDialog(None, message=prompt, caption=title, defaultValue=value)

    dlg.ShowModal()
    output = dlg.GetValue()
    dlg.Destroy()

    return output
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号