diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-16 19:13:30 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-16 19:29:11 +0200 |
commit | c8742a06ca84528a45a2f5bad7d169694757f096 (patch) | |
tree | de6949518db165932196ea47645799a8c538724c /examples | |
parent | d0db3d3e451089ef431321833b30bb2127cdcb7b (diff) | |
download | micropython-c8742a06ca84528a45a2f5bad7d169694757f096.tar.gz micropython-c8742a06ca84528a45a2f5bad7d169694757f096.zip |
Add dummy micropython module to enable mandel.py run with CPython.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/mandel.py | 6 | ||||
-rw-r--r-- | examples/micropython.py | 8 |
2 files changed, 14 insertions, 0 deletions
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 |