From c8742a06ca84528a45a2f5bad7d169694757f096 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 16 Jan 2014 19:13:30 +0200 Subject: [PATCH] Add dummy micropython module to enable mandel.py run with CPython. --- examples/mandel.py | 6 ++++++ examples/micropython.py | 8 ++++++++ 2 files changed, 14 insertions(+) create mode 100644 examples/micropython.py diff --git a/examples/mandel.py b/examples/mandel.py index 996132a915..d2b34fff83 100644 --- a/examples/mandel.py +++ b/examples/mandel.py @@ -1,3 +1,9 @@ +try: + import micropython +except: + pass + + def mandelbrot(): # returns True if c, complex, is in the Mandelbrot set @micropython.native diff --git a/examples/micropython.py b/examples/micropython.py new file mode 100644 index 0000000000..091c92deb3 --- /dev/null +++ b/examples/micropython.py @@ -0,0 +1,8 @@ +# micropython module placeholder for CPython + +# Dummy function decorators + +def nodecor(x): + return x + +byte_code = native = viper = nodecor