robert-hh / micropython-editor Goto Github PK
View Code? Open in Web Editor NEWSmall on-board editor for PyBoard, WiPy, ESP8266, ESP32, RP2040, W60x, XBEE 3, Sipeed K210, as well as PyCom and Adafruit devices written in Python
Small on-board editor for PyBoard, WiPy, ESP8266, ESP32, RP2040, W60x, XBEE 3, Sipeed K210, as well as PyCom and Adafruit devices written in Python
The Micropython-editor was featured in this CircuitPython newsletter this week! Look about halfway down.
https://www.adafruitdaily.com/2020/05/19/fifty-blinka-boards-python-survey-out-cp-5-4-0-beta-0-and-more-python-adafruit-circuitpython-circuitpython-micropython-thepsf/
I have added a few lines to rename the original file before saving by appending a '~' (tilde)
in put_file
os.remove(fname)
try:
os.remove(fname+'~')
except:
pass
try:
os.rename(fname,fname+'~')
except:
pass
Your thoughts?
Is this the best way to discuss this with you?
Are you still interested?
Feel free to email me.
I have no idea how I can install this on the ESP32 dev module that has micropython installed!
How do I get this running? Read.me doesn't say anything!
As you mentioned, Mac OS does not support control-(arrows). Nor does it have home, end, pg-up,pg-down
Do you know of a fork that does ?
It might be obvious but I can't figure it out
Thanks for this tool!
Can you give me some guidance on what modifications to the pyEditor code is required for accepting UART Inputs and also for displaying on an attached display?
Right now all inputs and outputs are run off the serial console.
Why I’m asking: I have a USB Host mode running on a coprocessor and sending keyboard codes to the main processor via UART. On the main processor I have a small display (240x240 pixels) showing the REPL console. I want to edit files using the attached USB keyboard through the UART and see it on this display. I want to be able to do this without requiring attachment to a computer via Serial. Basically, I want to make this a stand-alone CircuitPython computer. I’ll appreciate any guidance on how to update your code to support this standalone concept.
First, my apologies if this is not the place for this kind of question, but I didn't know where else to ask.
I was wondering if this library could be the backbone for a custom Distraction-free Writing Device where something like a Pico would be used in low frequency paired with a keyboard and a small LCD screen? It would be a standalone write-on-the-go little machine, not dependent on any other computers, but perhaps write the text files on a MicroSD card.
Thank you
Hi Robert,
I absolutely love your editor and think it should be a core app for MicroPython.
I am planning on possibly forking pye.py for the ESP8266 to do try and carefully pare down the feature set such that the app becomes more amenable to normal use, without needing to be frozen. I plan to keep to basic, bare set of editing features, and trash the rest.
Anyway before I get started digesting the app, do you KNOW how of any areas in the code where this could be done.
Keep up the good work!
Hello,
when i edit my code in REPL btw. pye('code.py') i only see the whole code in one line.
Is here the problem, that there are missing linefeeds?
Can i convert this in pye?
Regards
Juergen
"content can be redirected or pipe'd to pye."
What can this be used for. Being a VERY interactive editor I'm having trouble envisioning setting up a command stream, including control characters .
Thanks
It would be useful to return the selected string OR clipboard on exit.
Usage:
>>> pye('troubled.py')
...
select source line with complicated syntax (maybe copy to clipboard) and/or multiple lines with indents.
Example:
start_line, start_col, end_line, end_col = self.mark_range()
start_col = max(start_col - self.margin, 0)
end_col = max(end_col - self.margin, 0)
^q (( Maybe ask "return selection/clipboard/filename (s,c,f): ))
>>> ^v (paste to REPL)
>>> print(.format "{ I left out the closing brace.", variable)
Removing leading indent!
Normal copy paste will include indents and be unacceptable for REPL
Do all/most ESP32's (that you are familiar with and would run pye) have significant RTC (recovery) memory which could be used for clipboard or undo stack?
When you are testing and debugging (like using pye ) do you usually connect via USB or WiFi?
I have made few minor enhancements to your 2.73 source.
what is a good way to merge my changes into version 2.77 ?
this is a general question as I expect this may happen again here or in another repository.
thanks for your continued assistance.
Are you familiar with
GoogleChromeLabs/serial-terminal#41
Hi. Thanks for pye; I like it.
One problem: when creating a new file, I get an AttributeError 'module' object has no attribute is_dir.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.