Python: ZSYS module (mimics SYS) - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP Prime Software Library (/forum-15.html) +--- Thread: Python: ZSYS module (mimics SYS) (/thread-19989.html) |
Python: ZSYS module (mimics SYS) - StephenG1CMZ - 05-21-2023 08:24 PM ZSYS aims to mimic some of the functionality of the sys module, which is provided with most python's, but is absent from the micropython on most calculators. The aim of the initial implementation serves two purposes: To attempt to identify which calculator is running, which may be useful in tweaking portable code. And to emulate some functions that portable code might call in sys, where it is unavailable. Note: Those versions of the HP Prime that support Python will have sys built-in. Just use sys, unless you wish to make your code portable. With thanks to the contributions from this thread: https://www.hpmuseum.org/forum/thread-19962.html RE: Python: ZSYS module (mimics SYS) - StephenG1CMZ - 05-21-2023 08:27 PM Version 0.1 of ZSYS identifies calculator makers. (Specific calculators cannot generally be identified). Code:
Note: Since Python has yet to reach HP Prime Android, it is currently tested only on Numworks. RE: Python: ZSYS module (mimics SYS) - rprosperi - 05-21-2023 10:02 PM (05-21-2023 08:27 PM)StephenG1CMZ Wrote: Note: Since Python has yet to reach HP Prime Android, it is currently tested only on Numworks. Why not simply test it on a Prime device?? RE: Python: ZSYS module (mimics SYS) - StephenG1CMZ - 05-21-2023 11:26 PM Well, since you asked... Local shops don't sell it (they do sell Casio, but without Python). And I haven't bought anything mail-order for myself since attempting to buy a radio, which the guy at the post office would only hand over to Mr. G1CMZ - I didn't have a matching birth certificate. Also, I have always got a phone with me I know how to cut-and-paste code from an App. But the real HP Prime doesn't have standard WiFi, so I imagine I would have to mess around with and carry cables, OTG dongles and the like (not to mention the calculator)? The Numworks App just works*, wherever I am. *The HP Prime version may require a phone signal. https://www.hpmuseum.org/forum/thread-15976.html?highlight=HP+Prime+broken |