本文整理汇总了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
示例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