<commit_before>#!/usr/bin/python

import subprocess
import os
try:
	import configparser
except ImportError:
	import ConfigParser as configparser
import sys
from collections import OrderedDict

CONFIG_NAME = "config.ini"


def main():
	config = configparser.ConfigParser()

	if CONFIG_NAME in os.listdir('.'):
		config.read(CONFIG_NAME)
	else:
		config.add_section('system')
		config.set('system', 'debug', 'false')

		config.add_section('window')
		config.set('window', 'fullscreen', 'false')
		config.set('window', 'x_resolution', '1600')
		config.set('window', 'y_resolution', '900')
		config.set('window', 'aasamples', '4')

		config.add_section('profile')
		config.set('profile', 'show_fps', 'false')
		config.set('profile', 'show_profiler', 'false')

		with open(CONFIG_NAME, 'w') as f:
			config.write(f)

	args = ['blenderplayer']

	args.append('-f' if config.getboolean('window', 'fullscreen') else '-w')
	args.append(config.get('window', 'x_resolution'))
	args.append(config.get('window', 'y_resolution'))
	args.append('-m')
	args.append(config.get('window', 'aasamples'))

	if config.getboolean('profile', 'show_fps'):
		args.extend("-g show_framerate = 1".split())
	if config.getboolean('profile', 'show_profiler'):
		args.extend("-g show_profile = 1".split())
	if config.getboolean('system', 'debug'):
		args.append("-c")

	args.append(os.getcwd() + "/src/levels/level.blend")
<commit_msg>Adding a player path option to the config file.<commit_after>#!/usr/bin/python

import subprocess
import os
try:
	import configparser
except ImportError:
	import ConfigParser as configparser
import sys
from collections import OrderedDict

CONFIG_NAME = "config.ini"


def main():
	config = configparser.ConfigParser()

	if CONFIG_NAME in os.listdir('.'):
		config.read(CONFIG_NAME)
	else:
		config.add_section('system')
		config.set('system', 'debug', 'false')
		config.set('system', 'player_path', 'blenderplayer')

		config.add_section('window')
		config.set('window', 'fullscreen', 'false')
		config.set('window', 'x_resolution', '1600')
		config.set('window', 'y_resolution', '900')
		config.set('window', 'aasamples', '4')

		config.add_section('profile')
		config.set('profile', 'show_fps', 'false')
		config.set('profile', 'show_profiler', 'false')

		with open(CONFIG_NAME, 'w') as f:
			config.write(f)

	args = [config.get('system', 'player_path')]

	args.append('-f' if config.getboolean('window', 'fullscreen') else '-w')
	args.append(config.get('window', 'x_resolution'))
	args.append(config.get('window', 'y_resolution'))
	args.append('-m')
	args.append(config.get('window', 'aasamples'))

	if config.getboolean('profile', 'show_fps'):
		args.extend("-g show_framerate = 1".split())
	if config.getboolean('profile', 'show_profiler'):
		args.extend("-g show_profile = 1".split())
	if config.getboolean('system', 'debug'):
		args.append("-c")

	args.append(os.getcwd() + "/src/levels/level.blend")

{'fraction_non_alphanumeric': 0.18481621435932669, 'fraction_numerical': 0.006870491240123669, 'mean_word_length': 5.678899082568807, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3028226', 'n_tokens_mistral': 1065, 'n_tokens_neox': 994, 'n_words': 202}