def runserver(project_name):
	'''
	Runs a python cgi server in a subprocess.
	'''
	DIR = os.listdir(project_name)

	if 'settings.py' not in DIR:
		raise NotImplementedError('No file called: settings.py found in %s'%project_name)

	CGI_BIN_FOLDER = os.path.join(project_name, 'cgi', 'cgi-bin')
	CGI_FOLDER = os.path.join(project_name, 'cgi')
	if not os.path.exists(CGI_BIN_FOLDER):
		os.makedirs(CGI_BIN_FOLDER)

	os.chdir(CGI_FOLDER)
	subprocess.Popen("python -m http.server --cgi 8000")