[Microbit-Python] Towards a 1.0

Nicholas H.Tollervey ntoll at ntoll.org
Mon Jan 11 05:54:15 EST 2016


I think MicroPython already implements import but because there's no FS
on the device (to speak of) then it's counter-intuitive in some sense.
Having said that, it could be implemented as some sort of pre-processor
to the hexification process so the imported blocks of code are included
in the final script.

Make sense..?

N.

On 11/01/16 10:50, M.-A. Lemburg wrote:
> On 11.01.2016 10:45, David Whale wrote:
>> 4) Also, don't forget, while MicroPython performs well, it is a *lot*
>> slower than the other languages, because it is interpreted.
> 
> Regardless of the merits of the argument "interpreted vs. compiled",
> is the performance aspect really relevant for educational uses ?
> 
> The one feature I'm still missing with MicroPython is a way to
> have modules, i.e. be able to place multiple Python files on
> the Microbit and have MicroPython then "import" them using the standard
> import statement. That would reduce the frequent copy&paste to
> get helper functions and classes ready for use by a script.
> 
> Maybe something for a MicroPython 1.1 :-)
> 
> I guess a preprocessor in the flash tool could emulate this
> by using classes as module namespaces:
> 
> import myscript
> ->
> class myscript:
>     # paste myscript.py here
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/microbit/attachments/20160111/4de6ce4f/attachment.sig>


More information about the Microbit mailing list