示例#1
0
def open_listing_file(path, echo_to_stderr=1):
    # Begin a new error listing. If path is None, no file
    # is opened, the error counter is just reset.
    global listing_file, num_errors, echo_file
    if path is not None:
        listing_file = open_new_file(path)
    else:
        listing_file = None
    if echo_to_stderr:
        echo_file = sys.stderr
    else:
        echo_file = None
    num_errors = 0
示例#2
0
文件: Errors.py 项目: bzzzz/cython
def open_listing_file(path, echo_to_stderr = 1):
    # Begin a new error listing. If path is None, no file
    # is opened, the error counter is just reset.
    global listing_file, num_errors, echo_file
    if path is not None:
        listing_file = open_new_file(path)
    else:
        listing_file = None
    if echo_to_stderr:
        echo_file = sys.stderr
    else:
        echo_file = None
    num_errors = 0
示例#3
0
文件: Code.py 项目: enyst/plexnet
 def __init__(self, outfile_name):
     self.f = open_new_file(outfile_name)
     self.level = 0
示例#4
0
 def __init__(self, outfile_name):
     self.f = open_new_file(outfile_name)
     self.level = 0