なぜ LLSP を PY に変換するのですか?
.llsp is a word-block (Scratch-style) SPIKE project, while .py is plain Python text you can run in the SPIKE App's Python mode, in an editor, or version-control with git. People convert to Python for real code control, reuse, and readable diffs.
LLSP から PY への変換方法
pyspikon
Unzip the .llsp, then run python pyspikon.py path-to-file new-file-path to generate a .py from the project's project.json. Note the tool is deprecated and can be glitchy.
LEGO Education SPIKE App (Python mode)
Open a new Python project in the SPIKE App and re-create the logic as code; this is the most reliable way to get clean, runnable .py.
flippertools
Use this command-line toolkit for SPIKE/MINDSTORMS project files to inspect and pull the program out of the .llsp before hand-porting it to Python.
これらの形式について
.llsp ファイルは、LEGO Education SPIKE App バージョン 2 によって保存されるプロジェクトファイルです。これは、学生が SPIKE Prime または SPIKE Essential ロボット用に作成したブロックベースまたは Python のプログラムを保持します。このファイルは、プロジェクトのマニフェスト、SVG…
.LLSP の詳細を開く →.pyファイルはPythonソースコードファイルです。Python言語で書かれたプログラムやスクリプトを含むプレーンテキストです。コードを読むには、任意のテキストエディタで開いてください。実行するには、python.orgからPythonをインストールし、ターミナルで «python file.py» と入力します。信頼できないソースからの .py…
.PY の詳細を開く →品質と注意点
- コンバーターはすべてのブロックをカバーしているわけではありません。イベントと «マイブロック» は一般的にスキップされるため、手動で書き直す必要があります。
- pyspikon は非推奨とマークされているため、ハブで実行する前に出力のクリーンアップが必要になる場合があります。
- ワードブロックのプロジェクトが慣用的な Python と一対一で対応することは稀です。出力は開始ドラフトとして扱ってください。
よくある質問
pyspikon はまだメンテナンスされていますか?
どのブロックが変換に失敗しますか?
SPIKE ハブで .py を実行できますか?
.llsp 内の実際のプログラムはどこに保存されていますか?
project.json として保存されており、コンバーターはこれを解析して Python ファイルを構築します。