BetaRavener / uPyLoader

File transfer and communication tool for MicroPython boards
MIT License
355 stars 76 forks source link

Allow non-Python files to be edited #58

Closed vpatron closed 5 years ago

vpatron commented 6 years ago

Hello BR, the built-in editor only allows .py files. This seems overly restrictive. There are lots of useful text files other than Python files.

I like using JSON files for configuration, such as hostname of ESP board, name of AP to connect to, and AP password instead of hard-coding into the Python program.

Can you let the editor edit these other files?

To prevent editing binary files, perhaps you can read say the first 1k of data to check for only printable characters to determine if it's a text file. See StackExchange

BetaRavener commented 6 years ago

You're right that it is overly restricting and the idea with printable characters would probably work nicely. It should be quite easy to implement so I'll probably address this later today.

BetaRavener commented 6 years ago

Sorry that I didn't get earlier to this, should be working now.