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


Python BibleOrgSysGlobals.addStandardOptionsAndProcess方法代码示例

本文整理汇总了Python中BibleOrgSysGlobals.addStandardOptionsAndProcess方法的典型用法代码示例。如果您正苦于以下问题:Python BibleOrgSysGlobals.addStandardOptionsAndProcess方法的具体用法?Python BibleOrgSysGlobals.addStandardOptionsAndProcess怎么用?Python BibleOrgSysGlobals.addStandardOptionsAndProcess使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BibleOrgSysGlobals的用法示例。


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

示例1: len

# 需要导入模块: import BibleOrgSysGlobals [as 别名]
# 或者: from BibleOrgSysGlobals import addStandardOptionsAndProcess [as 别名]
            self.assertGreater( len(something), 1 )
        result4 = self.UMs.getTypicalNoteSets( 'xr' )
        self.assertTrue( isinstance( result4, tuple ) )
        self.assertLess( len(result4), len(result1) )
        for something in result4:
            self.assertTrue( isinstance( something , list ) )
            self.assertTrue( something )
            self.assertGreater( len(something), 1 )
        result5 = self.UMs.getTypicalNoteSets( 'pq' )
        self.assertEqual( result5, None )
    #end of test_2200_getTypicalNoteSets

    def test_2210_getMarkerListFromText( self ):
        """ Test the getMarkerListFromText function. """
        self.assertEqual( self.UMs.getMarkerListFromText(''), [] )
        self.assertEqual( self.UMs.getMarkerListFromText('This is just plain text.'), [] )
        self.assertEqual( self.UMs.getMarkerListFromText('This \\bk book\\bk* is good'), \
                                [('bk',5,' ','\\bk ',['bk'],1,'book'), ('bk',13,'*','\\bk*',[],None,' is good')] )
    #end of test_2210_getMarkerListFromText
# end of USFMMarkersTests class


if __name__ == '__main__':
    # Configure basic set-up
    parser = BibleOrgSysGlobals.setup( ProgName, ProgVersion )
    BibleOrgSysGlobals.addStandardOptionsAndProcess( parser )

    if BibleOrgSysGlobals.verbosityLevel > 1: print( ProgNameVersion )

    unittest.main() # Automatically runs all of the above tests
# end of USFMMarkersTests.py
开发者ID:alerque,项目名称:BibleOrgSys,代码行数:33,代码来源:USFMMarkersTests.py

示例2: print

# 需要导入模块: import BibleOrgSysGlobals [as 别名]
# 或者: from BibleOrgSysGlobals import addStandardOptionsAndProcess [as 别名]
        print( gsc ) # Just print a summary

        if BibleOrgSysGlobals.commandLineArguments.export:
            print( "Exports aren't written yet!" )
            #hlc.exportDataToPython() # Produce the .py tables
            #hlc.exportDataToC() # Produce the .h tables
            halt


    if 1: # demonstrate the Greek Lexicon class
        if BibleOrgSysGlobals.verbosityLevel > 1: print( "\nDemonstrating the Greek Lexicon class…" )
        hl = GreekLexicon( testFolder ) # Load and process the XML
        print( hl ) # Just print a summary
        print()
        for strongsKey in ('G1','G123','G165','G1732','G1979','G2011','G5624','G5625',): # Last one is invalid
            print( '\n' + strongsKey )
            print( " Data:", hl.getStrongsEntryData( strongsKey ) )
            print( " Pronunciation:", hl.getStrongsEntryField( strongsKey, 'pronunciation' ) )
            print( " HTML:", hl.getStrongsEntryHTML( strongsKey ) )
# end of demo

if __name__ == '__main__':
    # Configure basic set-up
    parser = BibleOrgSysGlobals.setup( ProgName, ProgVersion )
    BibleOrgSysGlobals.addStandardOptionsAndProcess( parser, exportAvailable=True )

    demo()

    BibleOrgSysGlobals.closedown( ProgName, ProgVersion )
# end of GreekLexicon.py
开发者ID:openscriptures,项目名称:BibleOrgSys,代码行数:32,代码来源:GreekLexicon.py


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