def bootstrap_rusthon():
	global BOOTSTRAPED
	localdir = os.path.dirname(unicode(os.path.realpath(__file__), sys.getfilesystemencoding()))
	#raise RuntimeError(localdir)
	mods = new_module()
	import_md( os.path.join(localdir,'src/main.md'), modules=mods )
	src = []
	mods_sorted_by_index = sorted(mods['python'], key=lambda mod: mod.get('index'))
	for mod in mods_sorted_by_index:  ## this is simplified because rusthon's source is pure python
		src.append( mod['code'] )
	src = '\n'.join(src)
	BOOTSTRAPED = src

	if '--dump' in sys.argv: open('/tmp/bootstrap-rusthon.py', 'wb').write(src.encode('utf-8'))
	exec(src, globals())

	if sys.argv in '--test':
		test_typedpython()  ## runs some basic tests on the extended syntax

	if '--runtime' in sys.argv:
		print('creating new runtime: pythonjs.js')
		jsruntime = generate_js_runtime()
		if os.path.isdir('./pythonjs'):
			print 'saving runtime to pythonjs/pythonjs.js'
			open('pythonjs/pythonjs.js', 'wb').write( jsruntime )
		return jsruntime


#MAIN#
dataset/ETHPy150Open rusthon/Rusthon/rusthon.py/bootstrap_rusthon/swapped operands of `in`