import os
import shutil

to_delete = [
	'session_stats',
	'libtorrent_logs*',
	'round_trip_ms.log',
	'dht.log',
	'upnp.log',
	'natpmp.log',
	'bin',
	'test_tmp_*'
]

directories = [
	'examples',
	'test',
	'.',
	'tools'
]

for d in directories:
	for f in to_delete:
		path = os.path.join(d, f)
		print path
		try:
			shutil.rmtree(path)
		except:
			pass


import os
import shutil
import glob

to_delete = [
	'session_stats',
	'libtorrent_logs*',
	'round_trip_ms.log',
	'dht.log',
	'upnp.log',
	'natpmp.log',
	'bin',
	'test_tmp_*',
	'bjam_build.*.xml'
]

directories = [
	'examples',
	'test',
	'.',
	'tools'
]

for d in directories:
	for f in to_delete:
		path = os.path.join(d, f)
		entries = glob.glob(path)
		for p in entries:
			print p
			try:
				shutil.rmtree(p)
			except:
				pass


improve clean.py