Re: tips for using eric for micropython?

2022-09-03 Thread Christian Haul

Hi Detlev,
aparently I'm missing something in the settings.

The REPL works fine even including completion (by the board of course). In an 
editor buffer, completion works for
QtScintilla (i.e., based on the buffer's content). I have enabled auto 
completion providers Eric, Jedi, QtScintilla,
Rope and same for call-tips providers. Disabling all but eric does not change 
anything.

Project is defined as "Micropython"/"Other".

For example, there is no suggestion for methods and properties for "machine" (after 
"import machine")

I didn't spot a plugin for µPy. The eric assistant plugin is installed.

When looking at 
~/eric_env/lib/python3.10/site-packages/eric7/APIs/MicroPython/micropython.api 
it looks like it should
do something: There are 131 lines starting "machine".

Is there a description of the file format? Even a tool for extracting from 
original py files or via introspection on the
board?

If I would want to add a specific flavor for the ESP8266 port - would it be 
sufficient to put another .api file
("micropython_esp8266.api") in that location?

As for the workflow. At the moment I code in an editor and use the "run on 
device" button. When things become more
stable, I plan to move those stable parts to separate files and upload them 
while keeping the main one, i.e.,
initialization and control loop, in this workflow until done or doing detached 
tests.

If this works out, I'd be happy to provide a howto. Anything that I could use 
for inspiration / format?

Chris.

Am 03.09.22 um 18:54 schrieb Detlev Offenbach:

Hi Chris,

when typing in the MicroPython console ther is no completion available as all 
the code is executed on the micro
controller. The suggested workflow is to code your project on the host computer 
using the eric Assistant completions
with the provided MicroPython API files. However, I cannot guarantee that these 
are complete and 100% in line with the
MicroPython or CircuitPython libraries. Patches and updates to these API files 
are welcome.

Once you reach a sufficient code maturity, you can copy these files onto the 
µController using the built in µPy file
management UI.

Hope this helps a little bit. Once you worked out a workflow for you, I would 
be happy to get a HowTo on this topic.

Regards,
Detlev

Am 03.09.22 um 18:23 schrieb Christian Haul:


Hi list,
I have recently started using Eric7 22.9 for micropython on an ESP8266 (Wemos 
D1 mini to be precise) and it works nicely.

However, I'm missing API hints and validation. Is there a way to tell Eric 
about the environment and provide feedback on
misspelled method names and get auto-completion?

How do others setup Eric with uPy? Do you put all libs into your workspace?

TIA,

Chris.







Re: tips for using eric for micropython?

2022-09-03 Thread Detlev Offenbach

Hi Chris,

when typing in the MicroPython console ther is no completion available 
as all the code is executed on the micro controller. The suggested 
workflow is to code your project on the host computer using the eric 
Assistant completions with the provided MicroPython API files. However, 
I cannot guarantee that these are complete and 100% in line with the 
MicroPython or CircuitPython libraries. Patches and updates to these API 
files are welcome.


Once you reach a sufficient code maturity, you can copy these files onto 
the µController using the built in µPy file management UI.


Hope this helps a little bit. Once you worked out a workflow for you, I 
would be happy to get a HowTo on this topic.


Regards,
Detlev

Am 03.09.22 um 18:23 schrieb Christian Haul:


Hi list,
I have recently started using Eric7 22.9 for micropython on an ESP8266 
(Wemos D1 mini to be precise) and it works nicely.


However, I'm missing API hints and validation. Is there a way to tell 
Eric about the environment and provide feedback on

misspelled method names and get auto-completion?

How do others setup Eric with uPy? Do you put all libs into your 
workspace?


TIA,

Chris.




--
Detlev Offenbach
det...@die-offenbachs.de



tips for using eric for micropython?

2022-09-03 Thread Christian Haul



Hi list,
I have recently started using Eric7 22.9 for micropython on an ESP8266 (Wemos 
D1 mini to be precise) and it works nicely.

However, I'm missing API hints and validation. Is there a way to tell Eric 
about the environment and provide feedback on
misspelled method names and get auto-completion?

How do others setup Eric with uPy? Do you put all libs into your workspace?

TIA,

Chris.





Micropython setup?

2022-09-03 Thread Christian Haul
Hi list,
Ich habe gerade angefangen, mit Eric auf einem ESP8266 uPy zu machen. Das 
funktioniert eigentlich ganz gut. Ich vermisse etwas das Ergänzen von APIs und 
es wäre cool, Schreibfehler in Methodennamen schon vor dem Start auf dem Device 
zu entdecken.

Hat jemand dazu Tipps, wie man das am besten aufsetzt? Kann man das Eric, rope 
oder Jedi beibringen oder legt man am besten Kopien der Libraries ins 
Arbeitsverzeichnis?

Wie machen das andere?

Dankeß

Christian.