当前位置: 首页>>代码示例>>Python>>正文


Python wordwrap.wordwrap函数代码示例

本文整理汇总了Python中wx.lib.wordwrap.wordwrap函数的典型用法代码示例。如果您正苦于以下问题:Python wordwrap函数的具体用法?Python wordwrap怎么用?Python wordwrap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了wordwrap函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: ShowAbout

 def ShowAbout(self, e):
     ''' ShowAbout function displays the About information of the application
     '''
     info = wx.AboutDialogInfo()
     info.Name = "Karthika"
     info.Version = "0.2.0"
     info.Copyright = "(c) Arunmozhi 2011"
     info.Description = wordwrap("Kathika is a offline Dictionary build "
                                 "using the Wiktionary data of the WikiMedia"
                                 "Foundation. It is build using Python with"
                                 "wxPython for the GUI. The underlying data "
                                 "is extracted from the XML dumps of the "
                                 "Wiktionary site.The indexing and searching"
                                 "is using the Whoosh Search Engine.",
                                 400, wx.ClientDC(self))
     info.WebSite = ("https://github.com/tecoholic/tawiktionary-offline",
                     "Project GitHub Page")
     info.Developers = ["Arunmozhi"]
     info.License = wordwrap("No License has been decided yet. You are free"
                             "to modify and distribute the program as per"
                             "your needs without any kind of attribution of"
                             "credits whatsoever for the original developer."
                             "But requested to maintain the resulting "
                             "software name as Karthika.",
                             400, wx.ClientDC(self))
     wx.AboutBox(info)
开发者ID:Peramanathan,项目名称:tawiktionary-offline,代码行数:26,代码来源:gui.py

示例2: __init__

 def __init__(self, *args, **kwds):
     # First we create and fill the info object
     parent = args[0]
     
     info = wx.AboutDialogInfo()
     info.Name = "pyspread"
     info.Version = config["version"]
     info.Copyright = "(C) Martin Manns 2008-2011"
     info.Description = wordwrap( 
         "A cross-platform Python spreadsheet application.\nPyspread is "
         "based on and written in the programming language Python.",
         350, wx.ClientDC(parent))
     info.WebSite = ("http://pyspread.sourceforge.net", 
                     "Pyspread Web site")
     info.Developers = ["Martin Manns"]
     info.DocWriters = ["Martin Manns", "Bosko Markovic"]
     
     license_file = open(get_program_path() + "/COPYING", "r")
     license_text = license_file.read()
     license_file.close()
     
     info.License = wordwrap(license_text, 500, wx.ClientDC(parent))
     
     # Then we call wx.AboutBox giving it that info object
     wx.AboutBox(info)
开发者ID:aunix,项目名称:pyspread,代码行数:25,代码来源:_dialogs.py

示例3: onAbout

    def onAbout(self, event): 
        from app import APP_NAME
        from app import APP_VERSION
        from wx.lib.wordwrap import wordwrap
        import platform

        description = "Octopylog is a sink for trace coming from different source\n"
        description += "\n WX-version : %s" % wx.VERSION_STRING
        description += "\n WX-plateform : %s" % wx.Platform
        description += "\n Python-version : %s" % platform.python_version()
        description += "\n Plateform : %s" % platform.platform(terse=True)
        description += "\n"
        
        info = wx.AboutDialogInfo()
        _icon = wx.EmptyIcon()
        _icon.CopyFromBitmap(wx.Bitmap("images/octopylog_logo.png", wx.BITMAP_TYPE_ANY))
        
        info.Icon = _icon 
        info.Name = APP_NAME
        info.Version = APP_VERSION
        info.Copyright = "GNU GENERAL PUBLIC LICENSE v3"
        info.Description = wordwrap(description, 350, wx.ClientDC(self))
        info.WebSite = ("http://developer.berlios.de/projects/octopylog/", "berlios home page")
        info.Developers = [ "Jean-Marc Beguinet" ]
        
        licenseText = "GNU GENERAL PUBLIC LICENSE v3\n"
        licenseText += "Please report to :\n"
        licenseText += "http://www.gnu.org/licenses/licenses.html"
        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        wx.AboutBox(info)

        event.Skip()
开发者ID:BackupTheBerlios,项目名称:octopylog,代码行数:33,代码来源:oc_mainframe.py

示例4: OnButton

    def OnButton(self, evt):
        # First we create and fill the info object
        info = wx.adv.AboutDialogInfo()
        info.Name = "Hello World"
        info.Version = "1.2.3"
        info.Copyright = "(c) 2016 Programmers and Coders Everywhere"
        info.Description = wordwrap(
            "A \"hello world\" program is a software program that prints out "
            "\"Hello world!\" on a display device. It is used in many introductory "
            "tutorials for teaching a programming language."

            "\n\nSuch a program is typically one of the simplest programs possible "
            "in a computer language. A \"hello world\" program can be a useful "
            "sanity test to make sure that a language's compiler, development "
            "environment, and run-time environment are correctly installed.",
            350, wx.ClientDC(self))
        info.WebSite = ("http://en.wikipedia.org/wiki/Hello_world", "Hello World home page")
        info.Developers = [ "Joe Programmer",
                            "Jane Coder",
                            "Vippy the Mascot" ]

        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        # Then we call wx.AboutBox giving it that info object
        wx.adv.AboutBox(info)
开发者ID:HelioGuilherme66,项目名称:Phoenix,代码行数:25,代码来源:AboutBox.py

示例5: OnAbout

    def OnAbout(self, event):
        self.log_debug("OnAbout")
        
        from wx.lib.wordwrap import wordwrap
        import pytestemb

        description = "Control Test is a script manager\n"
        description += "\n PyTestEmb-version : %s\n" % pytestemb.VERSION_STRING
        description += "\n WX-version : %s" % wx.VERSION_STRING
        description += "\n WX-plateform : %s" % wx.Platform
        description += "\n Python-version : %s" % platform.python_version()
        description += "\n Plateform : %s" % platform.platform(terse=True)
        description += "\n"
        
        info = wx.AboutDialogInfo()
        info.Name = APP_NAME
        info.Version = APP_VERSION
        info.Copyright = "GNU GENERAL PUBLIC LICENSE v3"
        info.Description = wordwrap(description, 350, wx.ClientDC(self))
        info.WebSite = ("http://developer.berlios.de/projects/pytestemb/", "berlios home page")
        info.Developers = [ "Jean-Marc Beguinet" ]
        
        licenseText = "GNU GENERAL PUBLIC LICENSE v3\n"
        licenseText += "Please report to :\n"
        licenseText += "http://www.gnu.org/licenses/licenses.html"
        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        wx.AboutBox(info)
开发者ID:BackupTheBerlios,项目名称:pytestemb,代码行数:28,代码来源:app.py

示例6: OnAbout

    def OnAbout(self, evt):
        licenseText = """This work is licensed under the GNU Public License (GPL).
        To view a copy of this license,
        visit http://www.gnu.org/copyleft/gpl.html
        """
        info = wx.AboutDialogInfo()
        info.Name = "mkArabicReverser"
        info.Version = "1.0.1"
        info.Copyright = "(C) 2013 Kumaran S/O Murugun"
        info.Description = wordwrap(
            "mkArabicReverser is an Arabic text reverser "
            "It takes your Arabic text from your source "
            "example: Word Processor, Web Browser, etc "
            "And it converts it into a format that is "
            "ready for your media applications "
            "\nexample: Photoshop, Illustrator, etc"
            "\nUTF-8,Unicode Support",
            350, wx.ClientDC(self))
        info.WebSite = ("http://github.com/atvkumar", "mkArabicReverser")
        info.Developers = [ "Kumaran",
                            "[email protected]",
                            "Abd Allah Diab",
                            "[email protected]" ]

        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
开发者ID:atvKumar,项目名称:mkArabicReverser,代码行数:28,代码来源:mkArabicReverser.py

示例7: OnAbout

 def OnAbout(self, event):
     info = wx.AboutDialogInfo()
     info.Name = "Yijing in Translation"
     info.Version = "1.0.0"
     info.Copyright = "(C) 2012 Matt Pagan\n"
     info.WebSite = ("http://yijingintranslation.com", "Yijing in Translation")
     info.Description = wordwrap(            
         "Yijing in Translation is written using wxPython. This program "
         "provides access to several different translations of the Yijing. "
         "This program can be used for divination, for semantic analysis, or as an e-reader for this ancient text."
         "\n\nThis work is dedicated with gratitude to my former "
         "professor Robert Ford Campany, who revealed to me the pernicious "
         "issue of translating ancient Chinese into modern English.\n",
         350, wx.ClientDC(self))
     info.License = wordwrap(
         "This program is free software: you can redistribute it and/or "
         "modify it under the terms of the GNU General Public License as "
         "published by the Free Software Foundation, either version 3 of "
         "the License, or (at your option) any later version. \n\nThis "
         "program is distributed in the hope that it will be useful, but "
         "WITHOUT ANY WARRANTY; without even the implied warranty of "
         "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU "
         "General Public License for more details. ",
         350, wx.ClientDC(self))
     wx.AboutBox(info)
开发者ID:mttpgn,项目名称:yijingintranslation,代码行数:25,代码来源:difftranslations.py

示例8: OnAbout

    def OnAbout(self, evt = None):
        # First we create and fill the info object
        info = wx.AboutDialogInfo()
        info.Name = appInfo.title
        info.Version = appInfo.version
        info.Copyright = appInfo.copyright
        info.Description = wordwrap(
            '\nMyTerm is a RS232 serial port communication utility.'
            
            '\n\nAiming at debugging easily, We added some special '
            'functions to "MyTerm for-YellowStone":'
            '\n >Transmit data as hexadecimal.'
            '\n >Set columns width when save log to a file'
            '\n >Read data from scripts and transmit them'
            '\n\nSpecial Thanks to Xiuru Chen. He has helped '
            'me fix many bugs and given many suggestions.'
            ,
            335, wx.ClientDC(self.frame))
        info.WebSite = (appInfo.url, "Home Page")
        info.Developers = [ appInfo.author ]
        info.License = wordwrap(appInfo.copyright, 500, wx.ClientDC(self.frame))

        info.Icon = icon32.geticon32Icon()

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
开发者ID:gamesun,项目名称:MyTerm-for-YellowStone,代码行数:26,代码来源:main.py

示例9: onAbout

 def onAbout(self, event):
     try:
         from wx.lib.wordwrap import wordwrap
     except:
         dial = wx.MessageDialog(
             self,
             message=u"Cannot show about information, sorry!",
             caption=u"Unknow Error",
             style=wx.OK | wx.CANCEL | wx.ICON_ERROR | wx.CENTRE)
         if dial.ShowModal() == wx.ID_OK:
             dial.Destroy()
     info = wx.adv.AboutDialogInfo()
     info.Name = "DataWorkshop"
     info.Version = self.appversion
     info.Copyright = "(C) 2014-2015 Tong Zhang, SINAP, CAS"
     info.Description = wordwrap(
         "This application is created for data post-processing.\n"
         "It is designed by Python language, using GUI module of wxPython.",
         350, wx.ClientDC(self))
     info.WebSite = (
         "", "Cornalyzer home page")  # fill it when webpage is ready
     info.Developers = ["Tong Zhang <[email protected]>"]
     licenseText = "DataWorkshop is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.\n" + "\nDataWorkshop is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n" + "\nYou should have received a copy of the GNU General Public License along with DataWorkshop; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
     info.License = wordwrap(licenseText, 500, wx.ClientDC(self))
     wx.adv.AboutBox(info)
开发者ID:archman,项目名称:felapps,代码行数:25,代码来源:datautils.py

示例10: UdpListenerStopped

 def UdpListenerStopped(self):
     global playerCount
     Publisher.unsubscribe(self.UdpListenerStopped, 'listener_stop')
     Publisher.unsubscribe(self.HostFound, 'host_found')
     if self.hostSearch:
         self.hostSearch = False
         if playerCount == 0:
             self.prgDialog.Update(100)
             if HOST_SYS == HOST_WIN:
                 self.prgDialog.Destroy()
                 if platform.release() == "XP":
                     dlgWin = wx.MessageDialog(self,wordwrap(tr("no_players_found"), 300, wx.ClientDC(self)), tr("no_player"), style=wx.OK)
                     result = dlgWin.ShowModal()
                     self.parent.Close()
             dlg = wx.SingleChoiceDialog(self,wordwrap(tr("no_players_found"), 300, wx.ClientDC(self)), tr("no_player"), ["Enter IP Address", tr("rescan"), tr("exit")])
             result = dlg.ShowModal()
             selection = dlg.GetSelection()
             if result == wx.ID_OK:
                 if selection == 0: # ENTER IP
                     ipDlg = wx.TextEntryDialog(self, "Enter the IP of your RaspMedia Player or Exit application with cancel.", "Enter IP Address");
                     if ipDlg.ShowModal() == wx.ID_OK:
                         ipAddress = ipDlg.GetValue()
                         self.HostFound([ipAddress, "RaspMedia"], "RaspMedia")
                         self.LoadControlWindowForCurrentHostList()
                     else:
                         self.parent.Close()
                 elif selection == 1: # RESCAN
                     self.SearchHosts()
                 elif selection == 2: # EXIT
                     self.parent.Close()
             elif result == wx.ID_CANCEL:
                 self.parent.Close()
         else:
             self.LoadControlWindowForCurrentHostList()
开发者ID:peter9teufel,项目名称:raspmedia,代码行数:34,代码来源:RemoteNotebook.py

示例11: __init__

    def __init__(self, *args, **kwds):
        # First we create and fill the info object
        parent = args[0]

        info = wx.AboutDialogInfo()
        info.Name = "pyspread"
        info.Version = config["version"]
        info.Copyright = "(C) Martin Manns"
        info.Description = wordwrap(
            _("A non-traditional Python spreadsheet application.\nPyspread is "
              "based on and written in the programming language Python."),
            350, wx.ClientDC(parent))
        info.WebSite = ("http://manns.github.io/pyspread/",
                        _("Pyspread Web site"))
        info.Developers = ["Martin Manns"]
        info.DocWriters = ["Martin Manns", "Bosko Markovic"]
        info.Translators = ["Joe Hansen", "Mark Haanen", "Yuri Chornoivan",
                            u"Mario Blättermann", "Christian Kirbach",
                            "Martin Manns", "Andreas Noteng"]

        license_file = open(get_program_path() + "/COPYING", "r")
        license_text = license_file.read()
        license_file.close()

        info.License = wordwrap(license_text, 500, wx.ClientDC(parent))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
开发者ID:lorynj,项目名称:pyspread,代码行数:28,代码来源:_dialogs.py

示例12: OnAboutDialog

    def OnAboutDialog(self, evt):
        licenseText = "GPL"
        # First we create and fill the info object
        info = wx.AboutDialogInfo()
        info.Name = "JBrew Controls"
        info.Version = "1.0"
        info.Copyright = "(C) 2012 JBrew Home Brewery"
        info.Description = wordwrap(
            "\"JBrew Controls\" is a program that uses an Arduino micro controller "
            "to interface with food grade pumps, temperature sensors, and a heating element "
            "in a Heat Exchange Recirculating Mashing System (HERMS). "
            "\n\nTo use \"Jbrew Controls\", simply select file->Change Brew Name to change "
            "the name of the Brew to your name, then enter a target mashing temperature and "
            "corresponding mashing time in the right control panel. Hit \"Start\" and the timer "
            "plus the Proportional Integral Differential (PID) closed loop feedback system will "
            "take care of the temperature control process for you. "
            "\n\n\"Jbrew Controls\" was written in wx Python, and the SpeedMeter control module "
            "written by Andrea Gavana, was used to aide in producing the meter drawings for the "
            "mash and HLT meters.", 350, wx.ClientDC(self))
        info.WebSite = ("Coming Soon", "Jbrew Controls web monitor")
        info.Developers = [ "Jordan Kagan - Lead Developer",
                            "Andrea Gavana - SpeedMeter controls module",
                          ]

        info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
开发者ID:jbrewkeggin,项目名称:jbrew_controls,代码行数:28,代码来源:jbrew_controls.py

示例13: menuAbout

	def menuAbout( self, event ):
		# First we create and fill the info object
		info = wx.AboutDialogInfo()
		info.Name = Version.AppVerName
		info.Version = ''
		info.Copyright = "(C) 2013"
		info.Description = wordwrap(
			"Combine CrossMgr results into a Series.\n\n"
			"",
			500, wx.ClientDC(self))
		info.WebSite = ("http://sites.google.com/site/crossmgrsoftware/", "CrossMgr Home Page")
		info.Developers = [
					"Edward Sitarski ([email protected])"
					]

		licenseText = "User Beware!\n\n" \
			"This program is experimental, under development and may have bugs.\n" \
			"Feedback is sincerely appreciated.\n\n" \
			"Donations are also appreciated - see website for details.\n\n" \
			"CRITICALLY IMPORTANT MESSAGE!\n" \
			"This program is not warrented for any use whatsoever.\n" \
			"It may not produce correct results, it might lose your data.\n" \
			"The authors of this program assume no reponsibility or liability for data loss or erronious results produced by this program.\n\n" \
			"Use entirely at your own risk.\n" \
			"Do not come back and tell me that this program screwed up your event!\n" \
			"Computers fail, screw-ups happen.  Always use a paper manual backup."
		info.License = wordwrap(licenseText, 500, wx.ClientDC(self))

		wx.AboutBox(info)
开发者ID:tymiles003,项目名称:CrossMgr,代码行数:29,代码来源:MainWin.py

示例14: about_mitemOnMenuSelection

 def about_mitemOnMenuSelection(self, event):
     try:
         # noinspection PyPackageRequirements
         from wx.lib.wordwrap import wordwrap
         info = AboutDialogInfo()
         info.Name = "Lattice Viewer"
         info.Version = "0.1.0"
         info.Copyright = "(C) 2016 Tong Zhang, SINAP, CAS"
         info.Description = wordwrap(
             "This is application is created for showing the lattice elements "
             "and configurations in tree style.", 350, wx.ClientDC(self))
         info.Developers = ["Tong Zhang <[email protected]>", ]
         lt = "Lattice Viewer is free software; you can redistribute it " \
              + "and/or modify it under the terms of the GNU General Public " \
              + "License as published by the Free Software Foundation; " \
              + "either version 3 of the License, or (at your option) any " \
              + "later version.\n" \
              + "\nLattice Viewer is distributed in the hope that it will be " \
              + "useful, but WITHOUT ANY WARRANTY; without even the implied " \
              + "warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR " \
              + "PURPOSE. See the GNU General Public License for more details.\n" \
              + "\nYou should have received a copy of the GNU General Public License " \
              + "along with Lattice Viewer; if not, write to the Free Software " \
              + "Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA"
         info.License = wordwrap(lt, 500, wx.ClientDC(self))
         AboutBox(info)
     except:
         dial = wx.MessageDialog(self,
                                 "Cannot show about informaion, sorry!",
                                 "Unknown Error",
                                 style=wx.OK | wx.CANCEL | wx.ICON_ERROR |
                                       wx.CENTRE)
         if dial.ShowModal() == wx.ID_OK:
             dial.Destroy()
开发者ID:archman,项目名称:beamline,代码行数:34,代码来源:myappframe.py

示例15: run

    def run(self):
        # First we create and fill the info object
        info = wx.AboutDialogInfo()
        info.Name = "geoi"
        info.Version = "1.0.0"
        info.Copyright = "(C) 2008 http://www.Etumos.org"
        info.Description = wordwrap(
            "Graphical User Interface enabling to create a python file\n"
            "for the simulation of a geochemical or a                 \n"
            "geochemical-transport problem with:                      \n"
            " - PHREEQC as geochemical tool,                          \n"
            " - and MT450 or Elmer as transport tools                 \n"
            "                                        \n"
            "The problem is saturated, unsaturated problems will      \n"
            "be treated in the next version of the software.          \n"
            "developments granted from the unemployement fund         \n",
            550, wx.ClientDC(self.getParent()))
        info.WebSite = ("http://www.gnu.org", "GNU home page")
        #("http://www.etumos.org", "ETUMOS home page"))
        info.Developers = [ "Alain Dimier:" ]

        info.License = wordwrap(LICENSE, 500, wx.ClientDC(self.getParent()))

        # Then we call wx.AboutBox giving it that info object
        wx.AboutBox(info)
开发者ID:apdimier,项目名称:Etumos,代码行数:25,代码来源:about.py


注:本文中的wx.lib.wordwrap.wordwrap函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。