[Microbit-Python] A native editor

Naomi Ceder naomi.ceder at gmail.com
Sun Dec 6 18:13:31 EST 2015


Tom, use the entire base directory as the unpacked extension - that worked
for me.

Naomi

On 6 December 2015 at 17:11, Tom Viner <tom at viner.tv> wrote:

> I'm opening python-native-editor/index.html in Chrome and I don't see how
> to get any extension (and there doesn't appear to be unpacked extension to load
> in developer <https://developer.chrome.com/extensions/getstarted#unpacked>
> mode either).
>
> I just get:
> repl.js:75 Uncaught TypeError: Cannot read property 'sync' of undefined
>
> on the line:
> hterm.defaultStorage = new lib.Storage.Chrome(chrome.storage.sync);
>
> On 6 December 2015 at 22:53, Naomi Ceder <naomi.ceder at gmail.com> wrote:
>
>> Ooops! My apologies! I see from looking at the code that new, open and
>> save are not yet implemented, just stubbed out, it appears.
>>
>> I misunderstood that. Never mind.
>>
>> Naomi
>>
>> On 6 December 2015 at 16:43, Naomi Ceder <naomi.ceder at gmail.com> wrote:
>>
>>> Thanks for the reference Carlos. That makes sense...
>>>
>>> At any rate, when I removed that permission, the warning of course went
>>> away. However it still coudn't find my micro:bit, since the port objects
>>> have neither a productId nor a vendorId on my system, only a path. When I
>>> matched on the path to what I knew to be the right path, I could get a repl
>>> working just fine. Which would imply that a different way of finding the
>>> right port is needed.
>>>
>>> I suppose the next thing is to look at the load/save issue.
>>>
>>> Cheers,
>>> Naomi
>>>
>>> On 6 December 2015 at 16:25, Carlos P.A. <carlos.p.a.87 at gmail.com>
>>> wrote:
>>>
>>>> Looks like RequestFileSystem might only be supported in ChromeOS, is
>>>> that the platform you've been using Nicholas?
>>>>
>>>>
>>>> https://groups.google.com/a/chromium.org/forum/m/#!msg/apps-dev/LEne7qedZrc/7ZEY0uwfDgAJ
>>>>
>>>> On 6 December 2015 at 22:09, Naomi Ceder <naomi.ceder at gmail.com> wrote:
>>>>
>>>>> Sadly I can't get the extension to work on either OSX or Linux -
>>>>> instead, the extension reports
>>>>>
>>>>>  There were warnings when trying to install this extension:
>>>>>
>>>>>    - 'fileSystem.requestFileSystem' is not allowed for specified
>>>>>    platform.
>>>>>
>>>>>
>>>>> So the result for me is that the new, open, and save functions don't
>>>>> do anything at all, and the repl says it can't find the microbit.
>>>>>
>>>>> I'm not finding any explanations of line, but I've attached a screen
>>>>> shot of the warning...
>>>>>
>>>>> I'm also not seeing any setting for Chrome that would seem to help.
>>>>>
>>>>> Cheers,
>>>>> Naomi
>>>>>
>>>>>
>>>>>
>>>>> On 6 December 2015 at 15:15, Carlos P.A. <carlos.p.a.87 at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> Excellent work Nicholas!
>>>>>>
>>>>>> Will the pluggin also automatically work when the interface is
>>>>>> accessed from the https://www.microbit.co.uk/create-code python
>>>>>> link? (once it is implemented in the webiste).
>>>>>>
>>>>>> As a small suggestion, probably with a low priority, is that having
>>>>>> some visual feedback on the page that the program is being flashed would be
>>>>>> ideal, even better if there was a tiny progress bar on the button.
>>>>>>
>>>>>> Regards,
>>>>>> Carlos
>>>>>>
>>>>>> On 6 December 2015 at 20:34, Nicholas H.Tollervey <ntoll at ntoll.org>
>>>>>> wrote:
>>>>>>
>>>>>>> Basically, this:
>>>>>>>
>>>>>>> https://www.youtube.com/watch?v=S8MGFVuZrrs
>>>>>>>
>>>>>>> ...is a first draft and the source code is here:
>>>>>>>
>>>>>>> https://github.com/ntoll/python-native-editor
>>>>>>>
>>>>>>> There's no documentation and I'll be working on it over the coming
>>>>>>> days
>>>>>>> with a view to showing it on Wednesday to a bunch of teachers.
>>>>>>>
>>>>>>> FYI - working out how to flash the device took several tortuous days.
>>>>>>> Chrome has a USB API that was documented to appear to be exactly
>>>>>>> what I
>>>>>>> needed (pushing file based data to the device). I spent far too much
>>>>>>> time learning about USB and getting permission to write to the
>>>>>>> device to
>>>>>>> work.
>>>>>>>
>>>>>>> In the end I gave up when I realised there was a really easy hack
>>>>>>> that
>>>>>>> was right in front of my nose... just copy the damn .hex file to the
>>>>>>> device via the built-in file-system API.
>>>>>>>
>>>>>>> It worked first time..! :-)
>>>>>>>
>>>>>>> That's several hours of my time I'll never get back.
>>>>>>>
>>>>>>> Early days. Collaboration welcome!
>>>>>>>
>>>>>>> Best wishes,
>>>>>>>
>>>>>>> Nicholas.
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Microbit mailing list
>>>>>>> Microbit at python.org
>>>>>>> https://mail.python.org/mailman/listinfo/microbit
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Microbit mailing list
>>>>>> Microbit at python.org
>>>>>> https://mail.python.org/mailman/listinfo/microbit
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Naomi Ceder
>>>>> https://plus.google.com/u/0/111396744045017339164/about
>>>>>
>>>>> _______________________________________________
>>>>> Microbit mailing list
>>>>> Microbit at python.org
>>>>> https://mail.python.org/mailman/listinfo/microbit
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Microbit mailing list
>>>> Microbit at python.org
>>>> https://mail.python.org/mailman/listinfo/microbit
>>>>
>>>>
>>>
>>>
>>> --
>>> Naomi Ceder
>>> https://plus.google.com/u/0/111396744045017339164/about
>>>
>>
>>
>>
>> --
>> Naomi Ceder
>> https://plus.google.com/u/0/111396744045017339164/about
>>
>> _______________________________________________
>> Microbit mailing list
>> Microbit at python.org
>> https://mail.python.org/mailman/listinfo/microbit
>>
>>
>
> _______________________________________________
> Microbit mailing list
> Microbit at python.org
> https://mail.python.org/mailman/listinfo/microbit
>
>


-- 
Naomi Ceder
https://plus.google.com/u/0/111396744045017339164/about
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/microbit/attachments/20151206/6a0f8236/attachment.html>


More information about the Microbit mailing list