Lines Matching refs:out_file
42 def encode(in_file, out_file, name=None, mode=None, *, backtick=False): argument
64 if out_file == '-':
65 out_file = sys.stdout.buffer
66 elif isinstance(out_file, str):
67 out_file = open(out_file, 'wb')
68 opened_files.append(out_file)
86 out_file.write(('begin %o %s\n' % ((mode & 0o777), name)).encode("ascii"))
89 out_file.write(binascii.b2a_uu(data, backtick=backtick))
92 out_file.write(b'`\nend\n')
94 out_file.write(b' \nend\n')
100 def decode(in_file, out_file=None, mode=None, quiet=False): argument
129 if out_file is None:
131 out_file = hdrfields[2].rstrip(b' \t\r\n\f').decode("ascii")
132 if os.path.exists(out_file):
133 raise Error('Cannot overwrite existing file: %s' % out_file)
139 if out_file == '-':
140 out_file = sys.stdout.buffer
141 elif isinstance(out_file, str):
142 fp = open(out_file, 'wb')
143 os.chmod(out_file, mode)
144 out_file = fp
145 opened_files.append(out_file)
159 out_file.write(data)