@@ -354,7 +354,7 @@ def main():
print(sys.exc_info()[1])
sys.exit(1)
if opt.outfile is not None:
- fd = file(opt.outfile, 'w')
+ fd = open(opt.outfile, 'w')
try:
clean_finish = False
testmod.runtests(tests, opt, env, run_filter)
@@ -313,7 +313,7 @@ def main():
print(sys.exc_info()[1])
sys.exit(1)
if opt.outfile is not None:
- fd = file(opt.outfile, 'w')
+ fd = open(opt.outfile, 'w')
try:
clean_finish = False
testmod.runtests(tests, opt, env, run_filter)
@@ -333,7 +333,7 @@ def main():
print(sys.exc_info()[1])
sys.exit(1)
if opt.outfile is not None:
- fd = file(opt.outfile, 'w')
+ fd = open(opt.outfile, 'w')
try:
clean_finish = False
testmod.runtests(tests, opt, env, run_filter)
@@ -38,7 +38,7 @@ class MyUnpickler(pickle.Unpickler):
return self.Unknown(name)
def show(filename, opt):
- fd = file(filename, 'r')
+ fd = open(filename, 'r')
p = MyUnpickler(fd)
tests = p.load()
testmod.printresults(tests, opt)
@@ -1419,12 +1419,12 @@ def run(infile, filters=True, pass_attrs=True, debug=False):
comment_string = "# Generated by rpcgen.py from %s on %s\n" % \
(infile, time.asctime())
- const_fd = file(constants_file + ".py", "w")
+ const_fd = open(constants_file + ".py", "w")
const_fd.write(comment_string)
- type_fd = file(types_file + ".py", "w")
+ type_fd = open(types_file + ".py", "w")
type_fd.write(comment_string)
type_fd.write("import %s as const\n" % constants_file)
- pack_fd = file(packer_file + ".py", "w")
+ pack_fd = open(packer_file + ".py", "w")
pack_fd.write(comment_string)
pack_fd.write(pack_header % (constants_file, types_file))
pack_fd.write(pack_init % name_base.upper())