Code Monkey home page Code Monkey logo

Comments (6)

paulober avatar paulober commented on July 19, 2024

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.

paulober avatar paulober commented on July 19, 2024

@brettnak Whats your status on that?

from micropico.

alexlukas avatar alexlukas commented on July 19, 2024

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.

paulober avatar paulober commented on July 19, 2024

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.

derekgraham avatar derekgraham commented on July 19, 2024

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.

paulober avatar paulober commented on July 19, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.