import os
import subprocess

root = os.path.realpath(__file__).replace("preview.py",'') + "examples"
counter = 0;
for path, subdirs, files in os.walk(root):
    for name in files:
		if 'html' in name:
			subprocess.call(['C:/Program Files (x86)/Google/Chrome/Application/chrome.exe', path.replace("\\",'/') + '/' + name], shell=True)
			counter += 1;
			if counter % 20 == 0:
				raw_input("enter to continue")