mu editor for micropython
mu editor for micropython
I've just discovered mu http://codewith.mu/ for the bbc microbit, and have modified it to work with the ESP8266 (or, indeed any device that communicates purely over serial). My fork is at https://github.com/eduvik/mu - feel free to have a play and/or contribute. It's all written in python
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mu editor for micropython
I've had a quick play with this and it looks great: amongst other things a neat way to flash code to the ESP8266 without using webrepl. I like the style checker, very user-friendly! Also the way it connects to Pyboards and ESP8266's automagically
Rather than run a binary from the web I cloned the repo, fixed the dependencies and ran the Python code directly. I'm getting the following issues:
It's running under Python 3.4.3 on Linux Mint 17.1 Rebecca.
A minor point: how do you populate the 'files on my computer' pane?
Incidentally spamming the forum will not engender popularity: one post suffices
Rather than run a binary from the web I cloned the repo, fixed the dependencies and ran the Python code directly. I'm getting the following issues:
- The REPL doesn't let me send ctrl characters to the target.
- The REPL doesn't respond normally to editing characters. If I type a followed by backspace it displays garbage.
It's running under Python 3.4.3 on Linux Mint 17.1 Rebecca.
A minor point: how do you populate the 'files on my computer' pane?
Incidentally spamming the forum will not engender popularity: one post suffices
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: mu editor for micropython
The binary isn't compiled with my changes, so you did the right thing!pythoncoder wrote: Rather than run a binary from the web I cloned the repo, fixed the dependencies and ran the Python code directly. I'm getting the following issues:
I'll have a look, but feel free to play with the source yourself, it's really quite accessible.pythoncoder wrote:These may be problems with my setup but any pointers would be welcome. Inability to send ctrl-C, ctrl-E, ctrl-D and suchlike to MicroPython is a bit of a deal-breaker. Control characters are handled normally in the edit window.
- The REPL doesn't let me send ctrl characters to the target.
- The REPL doesn't respond normally to editing characters. If I type a followed by backspace it displays garbage.
It's files in the folder ~/python (this is hard coded)pythoncoder wrote: A minor point: how do you populate the 'files on my computer' pane?
Fair enough .pythoncoder wrote: Incidentally spamming the forum will not engender popularity: one post suffices
Re: mu editor for micropython
I've had a bit of a play with this and found where the culprit is; pls continue discussion at https://github.com/eduvik/mu/issuespythoncoder wrote: Rather than run a binary from the web I cloned the repo, fixed the dependencies and ran the Python code directly. I'm getting the following issues:These may be problems with my setup but any pointers would be welcome. Inability to send ctrl-C, ctrl-E, ctrl-D and suchlike to MicroPython is a bit of a deal-breaker. Control characters are handled normally in the edit window.
- The REPL doesn't let me send ctrl characters to the target.
- The REPL doesn't respond normally to editing characters. If I type a followed by backspace it displays garbage.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mu editor for micropython
I may, but it's got some competition for my attention right nowaskvictor wrote:...feel free to play with the source yourself, it's really quite accessible...
Thanks for that: fixed with a symlink to my current project.askvictor wrote:...It's files in the folder ~/python (this is hard coded)...
I'll follow the Github progress with interest - I think this app has great promise.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: mu editor for micropython
OK; latest commit fixes most of the REPL issues (I think, not really tested it much)
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mu editor for micropython
It does indeed: big improvement I have a UI issue, though, but should it be raised against your fork or the original?
The dialog box which pops up if you click on files when the REPL is open (and vice versa) does not behave like a proper modal dialog: if you click on the main window it disappears behind the main window and the app appears to hang. For a beginner-focussed app this is confusing: it should remain in the foreground.
The dialog box which pops up if you click on files when the REPL is open (and vice versa) does not behave like a proper modal dialog: if you click on the main window it disappears behind the main window and the app appears to hang. For a beginner-focussed app this is confusing: it should remain in the foreground.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: mu editor for micropython
Raise it against the original.pythoncoder wrote:It does indeed: big improvement I have a UI issue, though, but should it be raised against your fork or the original?
The dialog box which pops up if you click on files when the REPL is open (and vice versa) does not behave like a proper modal dialog: if you click on the main window it disappears behind the main window and the app appears to hang. For a beginner-focussed app this is confusing: it should remain in the foreground.
The original devs are keen on including more functionality, so hopefully I'll merge the modifications upstream.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mu editor for micropython
Issue now raised. While your patch has fixed the REPL cursor control keys, it doesn't seem to have fixed the issue of sending selected control characters to the board. I use ^C ^D and ^E daily, but there may be others I'm forgetting.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: mu editor for micropython
I've produced this https://github.com/peterhinch/mu.git fork which allows control characters to be sent to the ESP8266 - at least under Linux. It's a quick hack and needs testing under Windows and OSX. It also eliminates the disappearing dialog boxes which gave the appearance that the app had crashed when a supposedly modal dialog skulked unseen behind the main window.
In general I'm an old-skool terminal-and-print-statement guy. But mu is a great way to flash code to the ESP8266 and run it if you want to work over USB rather than the webrepl; it's undoubtedly speeded up my efforts on the ESP.
In general I'm an old-skool terminal-and-print-statement guy. But mu is a great way to flash code to the ESP8266 and run it if you want to work over USB rather than the webrepl; it's undoubtedly speeded up my efforts on the ESP.
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.