mu editor for micropython

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
pythoncoder
Posts: 3707
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Fork now supports pasting at the REPL (ctrl-V). So ctrl-E ctrl-V ctrl-D allows code to be pasted in from the editor window or from another application.
Peter Hinch

Frida
Posts: 40
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: mu editor for micropython

Code: Select all

poul@poul-S400CA ~/Programmer/mu/mu $./run.py Traceback (most recent call last): File "./run.py", line 2, in <module> from mu.app import run File "/home/poul/Programmer/mu/mu/mu/app.py", line 27, in <module> from mu.logic import Editor, LOG_FILE, LOG_DIR File "/home/poul/Programmer/mu/mu/mu/logic.py", line 32, in <module> from pycodestyle import StyleGuide, Checker ImportError: No module named 'pycodestyle' poul@poul-S400CA ~/Programmer/mu/mu$ pycodestyle --version
2.0.0
poul@poul-S400CA ~/Programmer/mu/mu $ I'm lost, it say No module named 'pycodestyle', but I have version 2.0.0. What I lack, one symlink or? Yes Frida is my watchdog! pythoncoder Posts: 3707 Joined: Fri Jul 18, 2014 8:01 am Location: UK Contact: Re: mu editor for micropython Try Code: Select all $ pip install pycodestyle
You may also need

Code: Select all

\$ apt-get install pyflakes
These are handy features for checking Python code for style and correctness.
Peter Hinch

Lornioiz
Posts: 36
Joined: Wed Aug 03, 2016 11:39 am
Location: Florence, Italy

Re: mu editor for micropython

[quote="pythoncoder"]Fork now supports pasting at the REPL (ctrl-V). So ctrl-E ctrl-V ctrl-D allows code to be pasted in from the editor window or from another application.[/quote]

Hello to everyone!

I'm new to microPython and my knowledge is mostly Python 2.7 (hobbyist level, I wrote some small utility in order to make my work easy, but nothing too fancy).
I wanted to try MU but seems that I got something missing (Python 3.5.2 and Windows). I don't understand what I'm missing:

Traceback (most recent call last):
File "C:\Users\itafiu21\Desktop\mu-master\mu\app.py", line 27, in <module>
from mu.logic import Editor, LOG_FILE, LOG_DIR
File "C:\Users\itafiu21\Desktop\mu-master\mu\logic.py", line 33, in <module>
from mu.contrib import uflash, appdirs, microfs
File "C:\Users\itafiu21\Desktop\mu-master\mu\contrib\microfs.py", line 20, in <module>
from serial.tools.list_ports import comports as list_serial_ports
ImportError: No module named 'serial'

(sorry for the unformatted error, I could not get the code tag to work).

Can anyone tell me what I'm missing here?

Many thanks!

pythoncoder
Posts: 3707
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

The following dependencies need to be installed, in addition to the ones I mentioned above (pycodestyle and pyflakes):
python3-pyqt5
python3-serial

Hopefully someone with Windows knowledge will be able to tell you how to do this.
Peter Hinch

Lornioiz
Posts: 36
Joined: Wed Aug 03, 2016 11:39 am
Location: Florence, Italy

Re: mu editor for micropython

[quote="pythoncoder"]The following dependencies need to be installed, in addition to the ones I mentioned above (pycodestyle and pyflakes):
python3-pyqt5
python3-serial

Hopefully someone with Windows knowledge will be able to tell you how to do this.[/quote]

I got it to work with pyserial, unfortunately it crashes very often.
Tomorrowland I Will try it on macosx.
Thanks a anyway for the help!

pythoncoder
Posts: 3707
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: mu editor for micropython

Well it's standard Python: if it crashes on Windows you could always fix it Does it produce an error report?

I assume you're using my fork? As described above @askvictor's version (and the original) gave the appearance of a hang because the dialog boxes were not properly defined as modal dialogs. The change has been accepted upstream but I don't know if @askvictor is still supporting his fork.

For what it's worth I've used my fork extensively under Linux and it's reliable.
Peter Hinch

Musikermomo
Posts: 1
Joined: Tue Sep 27, 2016 10:29 pm

Re: mu editor for micropython

[quote="pythoncoder"]For what it's worth I've used my fork extensively under Linux and it's reliable.[/quote]

Unfortunately it still says :

[code]Traceback (most recent call last):
File "./run.py", line 2, in <module>
from mu.app import run
File "/home/mofitz/Downloads/mu-master/mu/app.py", line 27, in <module>
from mu.logic import Editor, LOG_FILE, LOG_DIR
File "/home/mofitz/Downloads/mu-master/mu/logic.py", line 30, in <module>
from PyQt5.QtSerialPort import QSerialPortInfo
ImportError: No module named 'PyQt5.QtSerialPort'[/code]

although I'm on a linux-machine and installed all of the dependencies you mentioned.
Any hints?

dhylands
Posts: 3246
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: mu editor for micropython

It's easy to install the dependencies for the wrong version of python.

For example, under ubuntu, you may have pip, pip2, and/or pip3 depending on which version of ubuntu you're running.

So if you're running python3 you need to make sure that the dependencies are installed for python 3 and not python 2 (and vice-versa).

askvictor
Posts: 23
Joined: Tue Mar 22, 2016 9:08 pm

Re: mu editor for micropython

A few fixes pushed