Index: tools/autotool.py
===================================================================
--- tools/autotool.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/autotool.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -75,5 +75,5 @@
 	"Read HelenOS build configuration"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	for line in inf:
@@ -191,5 +191,5 @@
 	check_common(common, "CC")
 	
-	outf = file(PROBE_SOURCE, 'w')
+	outf = open(PROBE_SOURCE, 'w')
 	outf.write(PROBE_HEAD)
 	
@@ -212,5 +212,5 @@
 	if (not os.path.isfile(PROBE_OUTPUT)):
 		sys.stderr.write("failed\n")
-		print output[1]
+		print(output[1])
 		print_error(["Error executing \"%s\"." % " ".join(args),
 		             "The compiler did not produce the output file \"%s\"." % PROBE_OUTPUT,
@@ -221,5 +221,5 @@
 	sys.stderr.write("ok\n")
 	
-	inf = file(PROBE_OUTPUT, 'r')
+	inf = open(PROBE_OUTPUT, 'r')
 	lines = inf.readlines()
 	inf.close()
@@ -343,5 +343,5 @@
 	"Create makefile output"
 	
-	outmk = file(mkname, 'w')
+	outmk = open(mkname, 'w')
 	
 	outmk.write('#########################################\n')
@@ -357,5 +357,5 @@
 	"Create header output"
 	
-	outhd = file(hdname, 'w')
+	outhd = open(hdname, 'w')
 	
 	outhd.write('/***************************************\n')
Index: tools/checkers/clang.py
===================================================================
--- tools/checkers/clang.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/checkers/clang.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -42,5 +42,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT>"
+	print(prname + " <ROOT>")
 
 def clang(root, job):
@@ -50,9 +50,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -64,5 +64,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enought jobfile record arguments")
 			return False
 		
@@ -76,5 +76,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -108,6 +108,6 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
@@ -115,9 +115,9 @@
 		if (not clang(rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/checkers/jobfile.py
===================================================================
--- tools/checkers/jobfile.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/checkers/jobfile.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -54,5 +54,5 @@
 				nil = True
 			else:
-				print "Unexpected '%s'" % record[i]
+				print("Unexpected '%s'" % record[i])
 				return False
 		
Index: tools/checkers/stanse.py
===================================================================
--- tools/checkers/stanse.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/checkers/stanse.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -43,5 +43,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT>"
+	print(prname + " <ROOT>")
 
 def stanse(root, job):
@@ -54,9 +54,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -69,5 +69,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enought jobfile record arguments")
 			return False
 		
@@ -81,5 +81,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -90,5 +90,5 @@
 		output.append([srcfname, tgtfname, base, options])
 	
-	outf = file(outname, "w")
+	outf = open(outname, "w")
 	for record in output:
 		outf.write("{%s},{%s},{%s},{%s}\n" % (record[0], record[1], record[2], record[3]))
@@ -121,6 +121,6 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
@@ -128,9 +128,9 @@
 		if (not stanse(rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/checkers/vcc.py
===================================================================
--- tools/checkers/vcc.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/checkers/vcc.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -49,5 +49,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ROOT> [VCC_PATH]"
+	print(prname + " <ROOT> [VCC_PATH]")
 
 def cygpath(upath):
@@ -72,5 +72,5 @@
 	preproc = subprocess.Popen(args, stdout = subprocess.PIPE).communicate()[0]
 	
-	tmpf = file(tmpfname, "w")
+	tmpf = open(tmpfname, "w")
 	tmpf.write(specification)
 	
@@ -108,9 +108,9 @@
 	
 	if (not os.path.isfile(inname)):
-		print "Unable to open %s" % inname
-		print "Did you run \"make precheck\" on the source tree?"
+		print("Unable to open %s" % inname)
+		print("Did you run \"make precheck\" on the source tree?")
 		return False
 	
-	inf = file(inname, "r")
+	inf = open(inname, "r")
 	records = inf.read().splitlines()
 	inf.close()
@@ -122,5 +122,5 @@
 		
 		if (len(arg) < 6):
-			print "Not enought jobfile record arguments"
+			print("Not enought jobfile record arguments")
 			return False
 		
@@ -134,5 +134,5 @@
 		srcfqname = os.path.join(base, srcfname)
 		if (not os.path.isfile(srcfqname)):
-			print "Source %s not found" % srcfqname
+			print("Source %s not found" % srcfqname)
 			return False
 		
@@ -153,5 +153,5 @@
 		
 		# Run Vcc
-		print " -- %s --" % srcfname		
+		print(" -- %s --" % srcfname)
 		retval = subprocess.Popen([vcc_path, '/pointersize:32', '/newsyntax', cygpath(tmpfqname)]).wait()
 		
@@ -182,6 +182,6 @@
 	
 	if (not os.path.isfile(vcc_path)):
-		print "%s is not a binary." % vcc_path
-		print "Please supply the full Cygwin path to Vcc as the second argument."
+		print("%s is not a binary." % vcc_path)
+		print("Please supply the full Cygwin path to Vcc as the second argument.")
 		return
 	
@@ -189,11 +189,11 @@
 	
 	if (not os.path.isfile(config)):
-		print "%s not found." % config
-		print "Please specify the path to HelenOS build tree root as the first argument."
+		print("%s not found." % config)
+		print("Please specify the path to HelenOS build tree root as the first argument.")
 		return
 	
 	specpath = os.path.join(rootdir, "tools/checkers/vcc.h")
 	if (not os.path.isfile(specpath)):
-		print "%s not found." % config
+		print("%s not found." % config)
 		return
 	
@@ -205,9 +205,9 @@
 		if (not vcc(vcc_path, rootdir, job)):
 			print
-			print "Failed job: %s" % job
+			print("Failed job: %s" % job)
 			return
 	
 	print
-	print "All jobs passed"
+	print("All jobs passed")
 
 if __name__ == '__main__':
Index: tools/config.py
===================================================================
--- tools/config.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/config.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -48,5 +48,5 @@
 	"Read saved values from last configuration run"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	for line in inf:
@@ -103,5 +103,5 @@
 		condval = res.group(3)
 		
-		if (not defaults.has_key(condname)):
+		if (not condname in defaults):
 			varval = ''
 		else:
@@ -131,5 +131,5 @@
 	"Parse configuration file"
 	
-	inf = file(fname, 'r')
+	inf = open(fname, 'r')
 	
 	name = ''
@@ -219,5 +219,5 @@
 			continue
 		
-		if (not defaults.has_key(varname)):
+		if (not varname in defaults):
 			return False
 	
@@ -232,5 +232,5 @@
 	
 	try:
-		version = subprocess.Popen(['bzr', 'version-info', '--custom', '--template={clean}:{revno}:{revision_id}'], stdout = subprocess.PIPE).communicate()[0].split(':')
+		version = subprocess.Popen(['bzr', 'version-info', '--custom', '--template={clean}:{revno}:{revision_id}'], stdout = subprocess.PIPE).communicate()[0].decode().split(':')
 		sys.stderr.write("ok\n")
 	except:
@@ -246,6 +246,6 @@
 		revision = None
 	
-	outmk = file(mkname, 'w')
-	outmc = file(mcname, 'w')
+	outmk = open(mkname, 'w')
+	outmc = open(mcname, 'w')
 	
 	outmk.write('#########################################\n')
@@ -263,5 +263,5 @@
 			continue
 		
-		if (not defaults.has_key(varname)):
+		if (not varname in defaults):
 			default = ''
 		else:
@@ -368,5 +368,5 @@
 			# Cancel out all defaults which have to be deduced
 			for varname, vartype, name, choices, cond in ask_names:
-				if ((vartype == 'y') and (defaults.has_key(varname)) and (defaults[varname] == '*')):
+				if ((vartype == 'y') and (varname in defaults) and (defaults[varname] == '*')):
 					defaults[varname] = None
 			
@@ -385,5 +385,5 @@
 					position = cnt
 				
-				if (not defaults.has_key(varname)):
+				if (not varname in defaults):
 					default = None
 				else:
@@ -428,5 +428,5 @@
 				cnt += 1
 			
-			if (position >= options):
+			if (position != None) and (position >= len(options)):
 				position = None
 			
@@ -449,10 +449,10 @@
 			
 			position = None
-			if (not opt2row.has_key(value)):
+			if (not value in opt2row):
 				raise RuntimeError("Error selecting value: %s" % value)
 			
 			(selname, seltype, name, choices) = opt2row[value]
 			
-			if (not defaults.has_key(selname)):
+			if (not selname in defaults):
 					default = None
 			else:
Index: tools/jobfile.py
===================================================================
--- tools/jobfile.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/jobfile.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -38,5 +38,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]"
+	print(prname + " <JOBFILE> <SOURCE> <TARGET> <TOOL> <CATEGORY> [OPTIONS ...]")
 
 def main():
@@ -53,5 +53,5 @@
 	options = " ".join(sys.argv[6:])
 	
-	jobfile = file(jobfname, "a")
+	jobfile = open(jobfname, "a")
 	fcntl.lockf(jobfile, fcntl.LOCK_EX)
 	jobfile.write("{%s},{%s},{%s},{%s},{%s},{%s}\n" % (srcfname, tgtfname, toolname, category, cwd, options))
Index: tools/mkfat.py
===================================================================
--- tools/mkfat.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/mkfat.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -46,5 +46,5 @@
 		return size
 	
-	return (((size / alignment) + 1) * alignment)
+	return ((size // alignment) + 1) * alignment
 
 def subtree_size(root, cluster_size, dirent_size):
@@ -79,5 +79,5 @@
 	first = 0
 	
-	inf = file(path, "r")
+	inf = open(path, "rb")
 	rd = 0;
 	while (rd < size):
@@ -92,5 +92,5 @@
 		prev = empty_cluster
 		
-		data = inf.read(cluster_size);
+		data = bytes(inf.read(cluster_size));
 		outf.seek(data_start + (empty_cluster - reserved_clusters) * cluster_size)
 		outf.write(data)
@@ -120,5 +120,5 @@
 		prev = empty_cluster
 		
-		data = ''
+		data = bytes()
 		data_len = 0
 		while ((i < length) and (data_len < cluster_size)):
@@ -343,5 +343,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <EXTRA_BYTES> <PATH> <IMAGE>"
+	print(prname + " <EXTRA_BYTES> <PATH> <IMAGE>")
 
 def main():
@@ -351,5 +351,5 @@
 	
 	if (not sys.argv[1].isdigit()):
-		print "<EXTRA_BYTES> must be a number"
+		print("<EXTRA_BYTES> must be a number")
 		return
 	
@@ -358,5 +358,5 @@
 	path = os.path.abspath(sys.argv[2])
 	if (not os.path.isdir(path)):
-		print "<PATH> must be a directory"
+		print("<PATH> must be a directory")
 		return
 	
@@ -372,7 +372,7 @@
 	# Make sure the filesystem is large enought for FAT16
 	size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes
-	while (size / cluster_size < fat16_clusters):
+	while (size // cluster_size < fat16_clusters):
 		if (cluster_size > sector_size):
-			cluster_size /= 2
+			cluster_size = cluster_size // 2
 			size = subtree_size(path, cluster_size, dirent_size) + reserved_clusters * cluster_size + extra_bytes
 		else:
@@ -381,20 +381,20 @@
 	root_size = align_up(root_entries(path) * dirent_size, cluster_size)
 	
-	fat_size = align_up(align_up(size, cluster_size) / cluster_size * fatent_size, sector_size)
-	
-	sectors = (cluster_size + fat_count * fat_size + root_size + size) / sector_size
+	fat_size = align_up(align_up(size, cluster_size) // cluster_size * fatent_size, sector_size)
+	
+	sectors = (cluster_size + fat_count * fat_size + root_size + size) // sector_size
 	root_start = cluster_size + fat_count * fat_size
 	data_start = root_start + root_size
 	
-	outf = file(sys.argv[3], "w")
+	outf = open(sys.argv[3], "wb")
 	
 	boot_sector = xstruct.create(BOOT_SECTOR)
 	boot_sector.jmp = [0xEB, 0x3C, 0x90]
-	boot_sector.oem = "MSDOS5.0"
+	boot_sector.oem = b'MSDOS5.0'
 	boot_sector.sector = sector_size
-	boot_sector.cluster = cluster_size / sector_size
-	boot_sector.reserved = cluster_size / sector_size
+	boot_sector.cluster = cluster_size // sector_size
+	boot_sector.reserved = cluster_size // sector_size
 	boot_sector.fats = fat_count
-	boot_sector.rootdir = root_size / dirent_size
+	boot_sector.rootdir = root_size // dirent_size
 	if (sectors <= 65535):
 		boot_sector.sectors = sectors
@@ -402,5 +402,5 @@
 		boot_sector.sectors = 0
 	boot_sector.descriptor = 0xF8
-	boot_sector.fat_sectors = fat_size / sector_size
+	boot_sector.fat_sectors = fat_size // sector_size
 	boot_sector.track_sectors = 63
 	boot_sector.heads = 6
@@ -414,6 +414,6 @@
 	boot_sector.extboot_signature = 0x29
 	boot_sector.serial = random.randint(0, 0x7fffffff)
-	boot_sector.label = "HELENOS"
-	boot_sector.fstype = "FAT16   "
+	boot_sector.label = b'HELENOS'
+	boot_sector.fstype = b'FAT16   '
 	boot_sector.boot_signature = [0x55, 0xAA]
 	
@@ -423,21 +423,21 @@
 	
 	# Reserved sectors
-	for i in range(1, cluster_size / sector_size):
+	for i in range(1, cluster_size // sector_size):
 		outf.write(empty_sector.pack())
 	
 	# FAT tables
 	for i in range(0, fat_count):
-		for j in range(0, fat_size / sector_size):
+		for j in range(0, fat_size // sector_size):
 			outf.write(empty_sector.pack())
 	
 	# Root directory
-	for i in range(0, root_size / sector_size):
+	for i in range(0, root_size // sector_size):
 		outf.write(empty_sector.pack())
 	
 	# Data
-	for i in range(0, size / sector_size):
+	for i in range(0, size // sector_size):
 		outf.write(empty_sector.pack())
 	
-	fat = array.array('L', [0] * (fat_size / fatent_size))
+	fat = array.array('L', [0] * (fat_size // fatent_size))
 	fat[0] = 0xfff8
 	fat[1] = 0xffff
@@ -449,5 +449,5 @@
 	for i in range(0, fat_count):
 		outf.seek(cluster_size + i * fat_size)
-		for j in range(0, fat_size / fatent_size):
+		for j in range(0, fat_size // fatent_size):
 			fat_entry.next = fat[j]
 			outf.write(fat_entry.pack())
Index: tools/mkhord.py
===================================================================
--- tools/mkhord.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/mkhord.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -52,5 +52,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>" 
+	print(prname + " <ALIGNMENT> <FS_IMAGE> <HORD_IMAGE>")
 
 def main():
@@ -60,19 +60,19 @@
 	
 	if (not sys.argv[1].isdigit()):
-		print "<ALIGNMENT> must be a number"
+		print("<ALIGNMENT> must be a number")
 		return
 	
 	align = int(sys.argv[1], 0)
 	if (align <= 0):
-		print "<ALIGNMENT> must be positive"
+		print("<ALIGNMENT> must be positive")
 		return
 	
 	fs_image = os.path.abspath(sys.argv[2])
 	if (not os.path.isfile(fs_image)):
-		print "<FS_IMAGE> must be a file"
+		print("<FS_IMAGE> must be a file")
 		return
 	
-	inf = file(fs_image, "rb")
-	outf = file(sys.argv[3], "wb")
+	inf = open(fs_image, "rb")
+	outf = open(sys.argv[3], "wb")
 	
 	header = xstruct.create(HEADER)
Index: tools/mktmpfs.py
===================================================================
--- tools/mktmpfs.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/mktmpfs.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -66,5 +66,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print prname + " <PATH> <IMAGE>"
+	print(prname + " <PATH> <IMAGE>")
 
 def recursion(root, outf):
@@ -85,5 +85,5 @@
 			outf.write(dentry.pack())
 			
-			inf = file(canon, "r")
+			inf = open(canon, "rb")
 			rd = 0;
 			while (rd < size):
@@ -116,8 +116,8 @@
 	path = os.path.abspath(sys.argv[1])
 	if (not os.path.isdir(path)):
-		print "<PATH> must be a directory"
+		print("<PATH> must be a directory")
 		return
 	
-	outf = file(sys.argv[2], "w")
+	outf = open(sys.argv[2], "wb")
 	
 	header = xstruct.create(HEADER)
Index: tools/mkuimage.py
===================================================================
--- tools/mkuimage.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/mkuimage.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -72,10 +72,10 @@
 			start_addr = (int)(optarg, 0)
 		else:
-			print base_name + ": Unrecognized option."
+			print(base_name + ": Unrecognized option.")
 			print_syntax(cmd_name)
 			return
 
 	if len(args) < 2:
-		print base_name + ": Argument missing."
+		print(base_name + ": Argument missing.")
 		print_syntax(cmd_name)
 		return
@@ -91,6 +91,6 @@
 
 def mkuimage(inf_name, outf_name, image_name, load_addr, start_addr):
-	inf = file(inf_name, 'rb')
-	outf = file(outf_name, 'wb')
+	inf = open(inf_name, 'rb')
+	outf = open(outf_name, 'wb')
 
 	header = xstruct.create(UIMAGE_HEADER)
@@ -140,5 +140,5 @@
 	signed_crc = zlib.crc32(byteseq, 0)
 	if signed_crc < 0:
-		return (long(signed_crc) + 4294967296L) # 2^32L
+		return (long(signed_crc) + (long(2) ** long(32))) # 2^32L
 	else:
 		return signed_crc
@@ -147,13 +147,13 @@
 #
 def print_syntax(cmd):
-	print "syntax: " + cmd + " [<options>] <raw_image> <uImage>"
+	print("syntax: " + cmd + " [<options>] <raw_image> <uImage>")
 	print
-	print "\traw_image\tInput image name (raw binary data)"
-	print "\tuImage\t\tOutput uImage name (U-Boot image)"
+	print("\traw_image\tInput image name (raw binary data)")
+	print("\tuImage\t\tOutput uImage name (U-Boot image)")
 	print
-	print "options:"
-	print "\t-name <name>\tImage name (default: 'Noname')"
-	print "\t-laddr <name>\tLoad address (default: 0x00000000)"
-	print "\t-saddr <name>\tStart address (default: 0x00000000)"
+	print("options:")
+	print("\t-name <name>\tImage name (default: 'Noname')")
+	print("\t-laddr <name>\tLoad address (default: 0x00000000)")
+	print("\t-saddr <name>\tStart address (default: 0x00000000)")
 
 if __name__ == '__main__':
Index: tools/pack.py
===================================================================
--- tools/pack.py	(revision b14b71e4c383761942ffe166e7deed2e27aa7360)
+++ tools/pack.py	(revision 4f35b9ff312815d8d10bd15cf522c3dc2d914ff2)
@@ -43,5 +43,5 @@
 def usage(prname):
 	"Print usage syntax"
-	print "%s <OBJCOPY> <FORMAT> <ARCH> <ARCH_PATH> [COMPONENTS ...]" % prname
+	print("%s <OBJCOPY> <FORMAT> <ARCH> <ARCH_PATH> [COMPONENTS ...]" % prname)
 
 def deflate(data):
@@ -110,7 +110,7 @@
 		symbol = "_binary_%s" % basename.replace(".", "_")
 		
-		print "%s -> %s" % (component, obj)
+		print("%s -> %s" % (component, obj))
 		
-		comp_in = file(component, "rb")
+		comp_in = open(component, "rb")
 		comp_data = comp_in.read()
 		comp_in.close()
@@ -121,5 +121,5 @@
 		
 		try:
-			comp_out = file(basename, "wb")
+			comp_out = open(basename, "wb")
 			comp_out.write(comp_deflate)
 			comp_out.close()
@@ -151,5 +151,5 @@
 		cnt += 1
 	
-	header = file(os.path.join(arch_path, "include", "%s.h" % COMPONENTS), "w")
+	header = open(os.path.join(arch_path, "include", "%s.h" % COMPONENTS), "w")
 	
 	header.write('/***************************************\n')
@@ -173,5 +173,5 @@
 	header.close()
 	
-	data = file(os.path.join(arch_path, "src", "%s.c" % COMPONENTS), "w")
+	data = open(os.path.join(arch_path, "src", "%s.c" % COMPONENTS), "w")
 	
 	data.write('/***************************************\n')
@@ -187,9 +187,9 @@
 	data.close()
 	
-	link_in = file(os.path.join(arch_path, "%s.in" % LINK), "r")
+	link_in = open(os.path.join(arch_path, "%s.in" % LINK), "r")
 	template = link_in.read()
 	link_in.close()
 	
-	link_out = file(os.path.join(arch_path, "%s.comp" % LINK), "w")
+	link_out = open(os.path.join(arch_path, "%s.comp" % LINK), "w")
 	link_out.write(template.replace("[[COMPONENTS]]", "\n".join(link_ctx)))
 	link_out.close()
