2

I know this is a very edge case and probably has no reason to exist,but are there pure python versions of builtins?
Specifically sys, I know its written in C for performance,but on my platform(a casio Prizm CG-FX 50 calculator) the standard library is non existent(ie math,random,and casioplot).
I've hit a developmental roadblock and really need a way of reading button presses, thus sys&stdin.

Thanks in advance

edit: Iv'e done some digging into the implementation and its MicroPython v1.9.4

edit2:It looks like a lot of the MP modules were removed during the port, I'm going to see if vanilla MP uos& usys is compatible.(will update)

  • [Pypy](https://www.pypy.org/) is a pure-python implementation of the entire python programming language and standard library that might work for you. [Jython](https://www.jython.org/) also exists, an implementation of python implemented on top of the JVM. Both are, to my knowledge, usable alternatives to cpython. [Python's website has a list of alternative implementations](https://www.python.org/download/alternatives/). – Green Cloak Guy Apr 09 '20 at 15:05
  • so PyPy is python written in python? – Liam Crowley Apr 09 '20 at 15:17
  • I'll look into PyPy to see if the sys is source based – Liam Crowley Apr 09 '20 at 16:30
  • 1
    Each hardware platform which runs MicroPython requires a port be made available. A port is a custom version of MicroPython for that hardware. When the port is created there are choices to be made as to what to include from the standard libraries as well as custom implementation required to surface the hardware capabilities for standard MicroPython functionlity and\or and new libraries and language extensions for hardware specific features. If this a calculator, and they did not include the Math library, then my _guess_ is they exposed some other API and you'll need to find that. – Patrick Apr 09 '20 at 20:34
  • You may find more information here: https://community.casiocalc.org/forum/48-casio-cfxafxfxprizm/ – Patrick Apr 09 '20 at 20:36
  • the math & random module are available; what I am trying to do is to find a source based distribution of the builtin modules or possibly some way to compile the c source for the prizm. there is an unofficial c sdk for the prizm. – Liam Crowley Apr 09 '20 at 21:38

0 Answers0