Comments (6)
The reason why VS Code knows something about modules like "machine" or "rp2" is because i've written custom python files to allow the Python VS Code extension know what is available. So at the moment you could download the umqtt module and copy the files in it into <Your-workspace>/.vscode/Pico-W-Stub/stubs/umqtt
. I think this should work as a temporary solution.
from micropico.
@brettnak Whats your status on that?
from micropico.
Is it possible to add/create stubs from a uf2 file? I want to create a program with a Pimoroni pico display (see github repo, however the problem is that one module seems to be built from C++ files, and therefore there is no python file I can copy to the stubs. Do you have any idea on how to proceed here? Thanks!
from micropico.
Is it possible to add/create stubs from a uf2 file? I want to create a program with a Pimoroni pico display (see github repo, however the problem is that one module seems to be built from C++ files, and therefore there is no python file I can copy to the stubs. Do you have any idea on how to proceed here? Thanks!
I think the only option is that you create a python file which contains all the raw functions or classes available in the native module and use this for the autocompletion like other python modules
from micropico.
just wanted to add that I was also enjoying trying Pico-W-Go out until I ran into exact same issue as Alexlukas - wanting to use Pimoroni pico display.
If I understood better what your response actually meant in practice I might attempt at some point. Conceptually it makes sense, but I just haven't done anything (yet) with python / C interaction, etc. that might inform me. Fascinating that every 'IDE' solution has to address this problem (new or libraries / modules / etc outside original scope). I imagine again and again... and I imagine there is no reason this can't be solved 'automatically' at some point and totally get how it may not be your top priority. Looking forward to checking back in at some point.
from micropico.
@alexlukas @derekgraham If you user their modified MicroPython firmware you only need the stubs for your MicroPython dev no C library or anything like that as they are included on the Pico. You then have to run https://github.com/Josverl/micropython-stubber on your Pico like i do in paulober/Pico-W-Stub and copy the files. Then rename to .pyi and you have some very basic stubs for the modules.
from micropico.
Related Issues (20)
- Could not run program by the error "Exception occured (maybe a connection loss)" on VS Code. (I need help) HOT 46
- Support for locally compiled firmware
- Micropico stopped working after version 3.2.6 HOT 13
- Linux x64 `GLIBC_2.31` backwards-compatibility
- could not add/install external modules to the extension HOT 1
- Have an option to disable auto-updating of the micropython-**-stubs HOT 2
- Switch stubs: use `python3 -m pip` instead of `pip` HOT 3
- upload current file in sub-directory HOT 6
- Add a page in wiki for REPL shortcut : .ls, .clear, .help, .... HOT 3
- how to build and test project ? HOT 2
- confusion over importing modules that python supports but micropython does not. HOT 14
- After creating new project, entries in `settings.json` appear grayed out HOT 2
- Documentation mentions sync button. But... where is the sync button? HOT 1
- Local Python Requirement? HOT 3
- Uploading .bmp files on RPI Pico HOT 4
- Kingsoft virus scanner triggers Malware alert when running project config HOT 7
- Add autorun script on connect option
- How to contribute HOT 5
- Board stuck after upload HOT 1
- After upload project, firmware doesn't run.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micropico.