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.
User avatar
pythoncoder
Posts: 1263
Joined: Fri Jul 18, 2014 8:01 am

Re: mu editor for micropython

Postby pythoncoder » Mon Aug 15, 2016 8:09 am

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

User avatar
Frida
Posts: 31
Joined: Sat Jan 30, 2016 2:20 pm
Location: Middelfart, Denmark

Re: mu editor for micropython

Postby Frida » Mon Aug 15, 2016 8:54 am

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!

User avatar
pythoncoder
Posts: 1263
Joined: Fri Jul 18, 2014 8:01 am

Re: mu editor for micropython

Postby pythoncoder » Mon Aug 15, 2016 12:30 pm

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: 32
Joined: Wed Aug 03, 2016 11:39 am
Location: Florence, Italy

Re: mu editor for micropython

Postby Lornioiz » Mon Sep 26, 2016 12:41 pm

[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!

User avatar
pythoncoder
Posts: 1263
Joined: Fri Jul 18, 2014 8:01 am

Re: mu editor for micropython

Postby pythoncoder » Mon Sep 26, 2016 3:10 pm

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: 32
Joined: Wed Aug 03, 2016 11:39 am
Location: Florence, Italy

Re: mu editor for micropython

Postby Lornioiz » Mon Sep 26, 2016 5:25 pm

[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!

User avatar
pythoncoder
Posts: 1263
Joined: Fri Jul 18, 2014 8:01 am

Re: mu editor for micropython

Postby pythoncoder » Tue Sep 27, 2016 6:43 am

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

Postby Musikermomo » Tue Sep 27, 2016 10:37 pm

[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?

User avatar
dhylands
Posts: 2110
Joined: Mon Jan 06, 2014 6:08 pm
Location: Shuswap, BC, Canada
Contact:

Re: mu editor for micropython

Postby dhylands » Tue Sep 27, 2016 11:28 pm

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: 22
Joined: Tue Mar 22, 2016 9:08 pm

Re: mu editor for micropython

Postby askvictor » Tue Oct 11, 2016 10:31 am

A few fixes pushed :)


Return to “Programs, Libraries and Tools”

Who is online

Users browsing this forum: No registered users and 1 guest