repo.or.cz
/
ScratchABlock.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
github/workflows/pycopy-test: Upgrade Pycopy to 3.6.1.
[ScratchABlock.git]
/
arch.py
blob
b4baa05bd87762959c04d9ffd8f4a258a04a2360
1
2
arch_m
=
None
3
4
# Default bitness if specific arch is not loaded
5
BITNESS
=
32
6
7
8
def
load_arch
(
name
):
9
global
arch_m
10
arch_m
=
__import__
(
"arch_"
+
name
)
11
for
var
in
dir
(
arch_m
):
12
if
var
.
startswith
(
"__"
):
13
continue
14
globals
()[
var
] =
getattr
(
arch_m
,
var
)
15
16
17
if
__name__
==
"__main__"
:
18
load_arch
(
"xtensa"
)
19
print
(
BITNESS
)