Files
micropython/tests/misc/cexample_module.py
Laurens Valk 19b1333cb1 examples/usercmodule/cexample: Add more advanced native class.
This adds a separate `AdvancedTimer` class that demonstrates a few more
advanced concepts usch as custom handlers for printing and attributes.

Signed-off-by: Laurens Valk <laurens@pybricks.com>
2024-07-25 11:57:13 +10:00

18 lines
269 B
Python

# test custom builtin module
try:
import cexample
except ImportError:
print("SKIP")
raise SystemExit
print(cexample)
print(cexample.__name__)
d = dir(cexample)
d.index("add_ints")
d.index("Timer")
d.index("AdvancedTimer")
print(cexample.add_ints(1, 3))