Commit 9615545a authored by Romain Casati's avatar Romain Casati
Browse files

Namespace closer to CPython's one.

parent ea3a8943
......@@ -65,7 +65,7 @@ class BasthonNamespace(object):
def __init__(self):
self.execution_count = None
self._namespace = None
self._namespace = {}
self._user_modules_root = "/basthon_user_modules"
# we don't insert at position 0 since
# https://github.com/iodide-project/pyodide/issues/737#issuecomment-750858417
......@@ -120,8 +120,10 @@ class BasthonNamespace(object):
basthon = self.basthon_internal
self.execution_count = 0
self._namespace = {
'__name__': '__main__',
self._namespace.clear()
self._namespace.update({
'__name__': '__console__',
'__doc__': None,
'_': '',
'__': '',
'___': '',
......@@ -129,7 +131,7 @@ class BasthonNamespace(object):
'Out': {},
'display': basthon.display,
'basthon': basthon
}
})
def stop(self):
"""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment