def zip_dir(zf,dir,basepath,ignore=[]):
	for root, dirs, files in os.walk(dir):
		for name in ignoreDirs:
			if name in dirs:
				dirs.remove(name)	# don't visit ignored directories			  
		for file in files:
			if ignoreFiles in file: continue
			e = os.path.splitext(file)
			if len(e)==2 and e[1]=='.pyc':continue
			from_ = os.path.join(root, file)	
			to_ = from_.replace(dir, basepath, 1)
			zf.write(from_, to_)
dataset/ETHPy150Open dezinezync/DZJSONKit/build.py/zip_dir/swapped operands of `in`