Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)

src/b/i/BibleOrgSys-HEAD/USFMBible.py   BibleOrgSys(Download)
 
import Globals
from USFMFilenames import USFMFilenames
from USFMBibleBook import USFMBibleBook
from Bible import Bible
    # See if there's an USFMBible project here in this given folder
    numFound = 0
    UFns = USFMFilenames( givenFolderName ) # Assuming they have standard Paratext style filenames
    if Globals.verbosityLevel > 2: print( UFns )
    filenameTuples = UFns.getMaximumPossibleFilenameTuples() # Returns (BBB,filename) 2-tuples
 
        # See if there's an USFM Bible here in this folder
        UFns = USFMFilenames( tryFolderName ) # Assuming they have standard Paratext style filenames
        if Globals.verbosityLevel > 2: print( UFns )
        filenameTuples = UFns.getMaximumPossibleFilenameTuples() # Returns (BBB,filename) 2-tuples
            return # No use continuing
 
        self.USFMFilenamesObject = USFMFilenames( self.sourceFolder )
        if Globals.verbosityLevel > 3 or (Globals.debugFlag and debuggingThisModule):
            print( self.USFMFilenamesObject )

src/b/i/BibleOrgSys-HEAD/Tests/USFMFilenamesTests.py   BibleOrgSys(Download)
    def setUp( self ):
        testFolder = 'Tests/DataFilesForTests/USFMTest1/' # This is a RELATIVE path
        if os.access( testFolder, os.R_OK ): # Create the USFMFilenames object
            self.UFns = USFMFilenames.USFMFilenames( testFolder )
        else: print( "Sorry, test folder '{}' doesn't exist on this computer.".format( testFolder ) )
    def setUp( self ):
        testFolder = 'Tests/DataFilesForTests/USFMTest2/' # This is a RELATIVE path
        if os.access( testFolder, os.R_OK ): # Create the USFMFilenames object
            self.UFns = USFMFilenames.USFMFilenames( testFolder )
        else: print( "Sorry, test folder '{}' doesn't exist on this computer.".format( testFolder ) )