News for hackers. Stuff that matters.
Re:Porting Python to GRUB: “Networking without an operating ... by sandGorgon on Wednesday July 13, 2016 @03:14AM (#12084425)
thank you for that. That explains a lot ! But Lua is already in Grub right ? wouldnt it have been more effective to just extend that anyway ?
Re:Porting Python to GRUB: “Networking without an operating ... by JoshTriplett on Wednesday July 13, 2016 @03:57AM (#12084600)
Lua isn't part of upstream GRUB; it lives in a separate module, "grub-extras". As far as I can tell, it also wouldn't be easy to extend that with additional functionality or modules without forking it, due to the way GRUB builds out-of-tree modules.

Note that this port of Python is almost as old as grub's Lua; we've been working on BITS since ~2009, and it has had Python support since May 2011.

For reference, the Python port consists of less than 1000 lines of code, most of which provides compatibility implementations of standard C and POSIX functions that Python expects. (Plus another couple thousand lines implementing additional C Python modules like "_smp", "_acpi", and "_efi", but those are getting smaller as we move more code into Python using ctypes.)