VEXcode V5 uses a modified version of Python runtime called Pyodide to support Python programming in browsers.
VEXcode V5 supports many of the Python 3.8 Standard library features such as:
- Built-in Functions - https://docs.python.org/3/library/functions.html
- Built-in Constants - https://docs.python.org/3/library/constants.html
- Built-in Types - https://docs.python.org/3/library/stdtypes.html
- Built-in Exceptions - https://docs.python.org/3/library/exceptions.html
- Data Types - https://docs.python.org/3/library/datatypes.html
- Data Structures - https://docs.python.org/3/tutorial/datastructures.html
- Numeric and Mathematical Modules - https://docs.python.org/3/library/numeric.html
- Functional Programming Modules - https://docs.python.org/3/library/functional.html
- Time - https://docs.python.org/3/library/time.html
- Text Processing Services - https://docs.python.org/3/library/text.html
Note: Not all the Standard Library features and API are tested in VEXcode V5 yet. Some of the standard Python language features are not supported in VEXcode V5 due to the nature of running Python in a browser runtime environment.
Examples of differences from standard Python:
- Local File System and Database Access, Multi-threading, Networking, Inter-Process communication will not work.
- Some of the File API will work (ex: Create/Open/Write) on top of the Browser's virtual file system. But these virtual “files” reside in the browser’s volatile memory, and they disappear when you navigate away from the VEXcode V5 page.
- As Python threading is not supported, VEXcode V5 supports a custom vr_threads which closely simulates co-operative tasks.