Did I find the right examples for you? yes no

All Samples(6)  |  Call(3)  |  Derive(0)  |  Import(3)

        def parse_file(filename, parser):
    result = None
    try:
        if filename.startswith("resource://"):
            parts = filename.split("/", 3)
            stream = resource_stream(parts[2], parts[3])
        elif filename.startswith("parlance://"):
            stream = resource_stream(__name__, filename.split("://")[1])
        else:
            stream = open(filename, 'rU', 1)
    except IOError, err:
        raise IOError("Failed to open configuration file %r %s" %
                (filename, err.args))
    
    try: result = parser(stream)
    finally: stream.close()
    return result
        


src/p/a/Parlance-1.4.1/parlance/gameboard.py   Parlance(Download)
from pkg_resources import split_sections
 
from config import Configuration, VerboseObject, judges, parse_file, variants
from functions import Comparable, Immutable, Infinity, all, any, defaultdict
from language import Message, Representation, Token, protocol
 
        if filename:
            parse_file(filename, self.parse)
 
    def mdf(self):

src/p/a/Parlance-1.4.1/parlance/language.py   Parlance(Download)
 
from functions import Comparable, rindex
from config    import Configurable, VerboseObject, parse_file
 
__all__ = [
        self.magic = None
 
        parse_file(self.options.dcsp_file, self.parse_dcsp)
 
        # Calculated constants needed by the above classes

src/p/a/Parlance-1.4.1/parlance/validation.py   Parlance(Download)
import re
 
from config   import VerboseObject, parse_file
from language import Token, protocol
from tokens   import BRA, ERR, HUH, KET, PRN
    def read_syntax(self):
        levels = parse_file(self.options.syntax_file, self.parse_syntax_file)
 
        if levels:
            # Expand press levels to be useful to the Game class