GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Docs
  • Command Line Interface
  • pyconv

This view

  • Original page
  • New address

GeezerVison is showing makecode.com — pxt-pyconv Manual Page

Skip to main content
About MakeCode Blog Online Learning Contact Us Tools
Technical Docs
JS Editor Features Programming Language Async Functions Partial Flashing Source Embedding Updating Blockly Version Accessibility Profiling Debugging Hardware
Creating Targets
pxtarget.json Defining Blocks Auto-generation of .d.ts Static File Drops Simulator Theming Editor Embedding resources
Creating Extensions
Getting started pxt.json Extension versioning Extension localization Extension approval Editor extensions GitHub Extension Authoring
Writing Docs
Macros Anchors Tutorials User Tutorials Skillmaps Routing Licensing Testing
Translations
Translation languages Localization files Parts to translate Translating markdown Translator roles In context translation
Blocks Embedding
Command Line Interface
install build bump deploy console gdb staticpkg update pyconv hidserial hiddmesg login
Labs UF2 File Format Accessibility Telemetry

pxt-pyconv Manual Page

Convert a MicroPython module(s) to PXT

pxt pyconv <directory> [<support directory>...]
pxt pyconv <file.py>... [<support directory>...]

Operation

All modules found in <directory> will be converted and written out in current directory. Modules are detected by presence of setup.py, README.rst or similar files.

If instead of directory you specify one or more .py files, they will be converted.

Additional Python modules will be searched for in the support directories. They are converted in background, but the results are not written.

Where is python?

The command requires Python 3 with py on Windows or python3 executable to be in the PATH. Or you can specify the python path in the PYTHON3 environment variable.

Limitations

Only a small fragment of Python is supported. The output is meant to be a starting point for a PXT module.

  • __getitem__, __setitem__ (indexers) are not supported
  • scopes of variables can get confused - you might need to pull out variables by hand

try/catch is converted by not supported by PXT yet.

See Also

pxt tool

Edit this page on GitHub
Edit template of this page on GitHub

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.