Supported Python Commands and Packages#

Core Commands#

All built-in commands, functions, constants, types, and exceptions included in Python 3.8 are able to be used in VEXcode VR.

References:

Core components such as string operations, regular expressions, and text wrapping are also supported.

References:

Available Packages#

The following packages are fully supported and can be imported into VEXcode VR so they can be used in coding projects. To do so, use the keyword import followed by the name of the package you want to import at the beginning of your coding project.

Supported Packages:

Preferred Installer Program (PIP) and micropip#

It is not possible to use PIP to install packages to VEXcode VR due to it being based entirely within the web browser. You can use micropip to import packages written purely in Python, but the packages will not work if they attempt to access hardware or use other unsupported features.

Due to the number of available packages, we are unable to provide a list of what packages will work in VEXcode VR.

import micropip

def main():
   # Tell micropip to install the "snowballstemmer" package.
   await micropip.install('snowballstemmer')
   # Now that "snowballstemmer" is installed, we can import the
   # package.
   import snowballstemmer
   # Use the package to find the stems of the words and print
   # them.
   stemmer = snowballstemmer.stemmer('english')
   brain.print(stemmer.stemWords('go goes going gone'.split()))

vr_thread(main)

Known Unsupported Features / Packages#

Concurrent Execution#

The native Python options for concurrent execution are not supported in VEXcode VR. This is due to security features in the browser and other web technologies used with VEXcode to prevent malicious access to your computer. VEXcode instead uses the vr_thread command to create a simplified thread for running things concurrently.

Unsupported Groups of Packages#

There are many Python packages that can be imported using the import keyword, but will not be supported in VEXcode VR.

Unsupported Python Groups of Packages for VEXcode VR:

  • File system or external application communication.

  • Networking or interprocess communication.

  • Packages requiring graphics.

  • Multimedia display or playback packages.

  • Packages, except micropip, for importing other packages.

  • OS-specific packages or those altering OS settings.

  • Python runtime packages.

  • Packages dedicated to managing or building Python packages and development tools.