VEXcode VRは、という Python ランタイムの修正バージョンを使用します。 > Pyodide: ブラウザーでの Python プログラミングをサポートします。
VEXcode VRは、次のような Python 3.8 標準ライブラリ機能の多くをサポートしています。
- 組み込み関数 -https://docs. python.org/3/library/functions.html
- 組み込み定数 -https://docs. python.org/3/library/constants.html
- 組み込みタイプ -https://docs. python.org/3/library/stdtypes.html
- 組み込み例外 -https://docs. python.org/3/library/Exceptions.html
- データ型 -https://docs.python. org/3/library/datatypes.html
- データ構造 -https://docs.python. org/3/tutorial/data Structures.html
- 数値および数学モジュール -https://docs. python.org/3/library/numeric.html
- 関数型プログラミング モジュール -https://docs.python .org/3/library/function.html
- 時間 -https://docs.python.org /3/library/time.html
- テキスト処理サービス -https://docs.python .org/3/library/text.html
注:標準ライブラリのすべての機能と API がまだ VEXcode VR でテストされているわけではありません。 ブラウザー ランタイム環境で Python を実行するという性質上、標準の Python 言語機能の一部は VEXcode VR ではサポートされていません。
標準の Python との違いの例:
- ローカル ファイル システムとデータベース アクセス、マルチスレッド、ネットワーク、プロセス間通信は機能しません。
- ファイル API の一部はブラウザの仮想ファイル システム上で動作します (例: 作成/開く/書き込み)。 ただし、これらの仮想「ファイル」はブラウザの揮発性メモリに常駐しており、VEXcode VR ページから離れると消えてしまいます。
- print(...) の代わりに Brain.print(...) を使用する必要があります。
- Python スレッドはサポートされていないため、VEXcode VR はカスタムをサポートします。 > vr_threadsは、協力タスクを厳密にシミュレートします。