def create_project(config_data):
env = deepcopy(dict(os.environ))<EOL>env[str('<STR_LIT>')] = str('<STR_LIT>'.format(config_data.project_name))<EOL>env[str('<STR_LIT>')] = str(os.pathsep.join(map(shlex_quote, sys.path)))<EOL>kwargs = {}<EOL>args = []<EOL>if config_data.template:<EOL><INDENT>kwargs['<STR_LIT>'] = config_data.template<EOL><DEDENT>args.append(config_data.project_name)<EOL>if config_data.project_directory:<EOL><INDENT>args.append(config_data.project_directory)<EOL>if not os.path.exists(config_data.project_directory):<EOL><INDENT>os.makedirs(config_data.project_directory)<EOL><DEDENT><DEDENT>base_cmd = '<STR_LIT>'<EOL>start_cmds = [os.path.join(os.path.dirname(sys.executable), base_cmd)]<EOL>start_cmd_pnodes = ['<STR_LIT>']<EOL>start_cmds.extend([<EOL>os.path.join(os.path.dirname(sys.executable), pnode, base_cmd)<EOL>for pnode in start_cmd_pnodes<EOL>])<EOL>start_cmd = [base_cmd]<EOL>for p in start_cmds:<EOL><INDENT>if os.path.exists(p):<EOL><INDENT>start_cmd = [sys.executable, p]<EOL>break<EOL><DEDENT><DEDENT>cmd_args = start_cmd + ['<STR_LIT>'] + args<EOL>if config_data.verbose:<EOL><INDENT>sys.stdout.write('<STR_LIT>'.format('<STR_LIT:U+0020>'.join(cmd_args)))<EOL><DEDENT>try:<EOL><INDENT>output = subprocess.check_output(cmd_args, stderr=subprocess.STDOUT)<EOL>sys.stdout.write(output.decode('<STR_LIT:utf-8>'))<EOL><DEDENT>except subprocess.CalledProcessError as e:  <EOL><INDENT>if config_data.verbose:<EOL><INDENT>sys.stdout.write(e.output.decode('<STR_LIT:utf-8>'))<EOL><DEDENT>raise<EOL><DEDENT>
Call django-admin to create the project structure

:param config_data: configuration data