Page 2 of 5

Re: mu editor for micropython

Posted: Mon Aug 15, 2016 8:09 am
by 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.

Re: mu editor for micropython

Posted: Mon Aug 15, 2016 8:54 am
by Frida

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?

Re: mu editor for micropython

Posted: Mon Aug 15, 2016 12:30 pm
by pythoncoder
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.

Re: mu editor for micropython

Posted: Mon Sep 26, 2016 12:41 pm
by Lornioiz
[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!

Re: mu editor for micropython

Posted: Mon Sep 26, 2016 3:10 pm
by 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.

Re: mu editor for micropython

Posted: Mon Sep 26, 2016 5:25 pm
by Lornioiz
[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!

Re: mu editor for micropython

Posted: Tue Sep 27, 2016 6:43 am
by pythoncoder
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.

Re: mu editor for micropython

Posted: Tue Sep 27, 2016 10:37 pm
by Musikermomo
[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?

Re: mu editor for micropython

Posted: Tue Sep 27, 2016 11:28 pm
by dhylands
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).

Re: mu editor for micropython

Posted: Tue Oct 11, 2016 10:31 am
by askvictor
A few fixes pushed :)