const flask = getEditor("#code", "py")

brython({ids:["pyinit"]})

function run() {
	document.getElementById("pycode").innerHTML = flask.getCode()
	brython({ids:["pyclear"]})
	brython({
		debug:1,
		ids:["pycode"]
	})
}

function example() {
	flask.updateCode("def foo(n):\n  for i in range(n):\n    print('passe ' + str(i))\n  return n*n\n\nprint(foo(5))")
}

function clearCode() {
	flask.updateCode("")
}
