ntoll / uflash

A module and command to easily flash Python onto the BBC's micro:bit device.
http://micropython.org/
MIT License
101 stars 27 forks source link

New command: py2hex #51

Closed ScottDWebster closed 5 years ago

ScottDWebster commented 6 years ago

This ought to be the final form of my code unless bugs are found or you'd like me to change anything. I realized that I didn't need a separate .py file to have a second command line utility so I reintegrated my code w/ uflash.py and changed the name of the command to 'py2hex' to avoid any confusion with the hexlify() function.

py2hex is intended for creating .hex files from .py files on the local filesystem and can handle multiple input files (*.py, etc.). It defaults to creating the .hex file in the same directory as the .py file but includes an option to specify a different output directory.

ntoll commented 6 years ago

Hi @ScottDWebster

This is wonderful to see..! Thank you so much for your efforts. Just a quick heads up in terms of my workload at the moment: I'm about to release Mu 1.0 next week and this is taking an inordinate amount of time and coordination. I just want to acknowledge this PR and your work and assure that it's not fallen under the radar... rather, I'm saving up fun stuff like reviewing this PR until I've cleared Mu off my desk (I hope that makes sense). Hopefully I'll have the time next week to spend the required amound of time to review this PR properly (so far I've only managed to quickly glance -- but AFAICT it's looking good).

Many thanks, N.

ScottDWebster commented 6 years ago

You're welcome and thank you for the opportunity to contribute. It has been fun and informative to dig into this code. I'm relatively new to Python so I appreciate opportunities to both gain experience and prove my capabilities. Yes, I am aware of your work on Mu and the approaching 1.0 release. I have been following the beta releases. It's actually probably a good thing that you didn't immediately merge my PR as I've gone back and improved it, changing direction in some instances. I look forward to your review of my PR.

ScottDWebster commented 5 years ago

Hi Nicholas. I don't mean to be a pest, but I was wondering if you have a timeline in mind for the inclusion of my code into the official release of uflash.

I don't know if you follow Chrome OS news, but I've been playing with an HP Chromebook and following Chrome OS developments. I actually did nearly all of my last round of development on uflash on the Chromebook using an Android app called Termux that provides a console only Linux environment.

The latest stable release (version 69) added support for running Linux apps in VM (debian stretch) for many models of Chromebook. I had to switch to the beta channel to get that support on mine, though. Unfortunately, access to the USB ports from within the VM doesn't yet exist, but the Chrome OS files app has access to the VM's filesystem. So for development within the Linux VM, py2hex would be useful for saving hex files on the local filesystem and then using the files app to copy to the microbit.

I may also poke around in Thonny and Mu to see how a "save as hex" or "export hex" option might be added.

ntoll commented 5 years ago

Hi Scott... many many apologies. My delay is down to work related constraints more than anything. I'll try to get to this in the coming week. Sorry about that.

ScottDWebster commented 5 years ago

No problem and thanks. BTW, I just watched your interview at Adafruit from the spring. I had to chuckle when you quoted your friend as saying he'd "tip you the wink." Phrases don't get much more British sounding than that. :-D

ntoll commented 5 years ago

Hahaha... Well, I'll tip you the wind when I review/merge this. ;-)

ScottDWebster commented 5 years ago

Hi Nicholas. I just wanted to give you a bit of a nudge and point out that that it is currently a few days short of a year since I submitted this pull request.

ntoll commented 5 years ago

@ScottDWebster Hi Scott, I can only but apologise for the lack of movement on this. I'm currently at EuroPython and hope to find time later this week to get this PR reviewed / merged. Thanks for your patience, and (once again) sorry for the delay... completely my fault.

ScottDWebster commented 5 years ago

Just another friendly reminder of the outstanding pull request.

ntoll commented 5 years ago

@ScottDWebster you're very patient, and thank you for the prod. I'm looking at it right now.

ntoll commented 5 years ago

@ScottDWebster okedokey... that's all merged. I fixed an indentation gremlin and bumped to version number too. It's all been pushed as the 1.3.0 release to PyPI.

Many thanks for your contribution, and many many many more thanks for your patience..!

ScottDWebster commented 5 years ago

Many thanks to you for the project and the opportunity to participate. Yeah, I had decided to try to poke you about once a month to not let you forget for too long. :-)