Shop OBEX P1 Docs P2 Docs Learn Events
Micropython for P2 - Page 23 — Parallax Forums

Micropython for P2

1171819202123»

Comments

  • RaymanRayman Posts: 14,319

    @ersmith The terminal from loadp2 seems to be much better handling the escape sequences than the Flexprop terminal. Is that something that could be added as an option to Flexprop?

  • RaymanRayman Posts: 14,319
    edited 2024-09-25 17:23

    Was very happy with the loadp2 terminal window for being in color and seeming to work perfectly for pye (editor).
    But, was sad to see that backspace key doesn't work. Seems to just be ignored.
    Not really sure how that is even possible...

    But, fortunately, web search showed me that CTRL-h will do backspace.
    This seems odd, but guess it's from ASCII

    Hmm seems now that backspace key acts like "DEL" key should...

  • ElectrodudeElectrodude Posts: 1,649
    edited 2024-09-25 17:04

    What's this loadp2 terminal window you speak of? Isn't loadp2 just a command-line program that uses your OS's terminal, or is the Windows version different?

  • RaymanRayman Posts: 14,319

    IDK, but it's what I get when using loadp2 to launch code.
    Maybe because it's the "new console"?

    1343 x 764 - 51K
  • RaymanRayman Posts: 14,319
    edited 2024-09-25 18:03

    @ersmith pye seems to run perfectly when it is the first thing to run.
    But, seems to crash sometimes when called later.
    Not exactly sure what is going on there, but maybe related to it crashing with HIMEM=flash...

    Maybe one just needs to import pye first thing... Trying that now... Yikes, it just erased the whole uSD...

    Perhaps my version of pye is broke... Maybe it was me that broke it... Have to try the original again...

  • ersmithersmith Posts: 6,014

    @Rayman said:
    @ersmith Seems that using _execve() is fine, except that uSD doesn't mount. Is there any way to fix that?

    I don't know. _execve is a bit dicey for very large programs (like micropython) so I'm actually kind of surprised it works. Do you have any idea (debug messages from upython or anything similar) why the uSD isn't mounting?

  • ersmithersmith Posts: 6,014

    @Rayman said:
    @ersmith The terminal from loadp2 seems to be much better handling the escape sequences than the Flexprop terminal. Is that something that could be added as an option to Flexprop?

    loadp2 doesn't have any terminal, it just uses the one the operating system provides.

    If you happen to know what escape sequences aren't being handled let me know and I can try to fix them in Flexprop.

  • RaymanRayman Posts: 14,319

    @ersmith well it’s primarily the foreground and background color ones.

    But also, those that pye uses to redraw the screen. Those are not working right.
    Especially, when trying to scroll down past the first page of a file…

  • RaymanRayman Posts: 14,319
    edited 2024-09-26 15:48

    Tried the pye.py from the @ersmith github with HIMEM=flash and it doesn't work either...
    So, that is still broke. Was hoping that some change that was made in my version of pye was why it was broke, but no dice...

    Better than it was though. At least pye loads. Locks up shortly after loading though.

  • RaymanRayman Posts: 14,319

    The terminal window launched from Visual Studio Community just got a lot stranger on a very new Win 11 and VS install.
    In the pye text editor, CTRL-S stopped working.
    This was very odd. Right clicking on top of window showed a whole bunch of new options that weren't there before.
    Somehow, was able to click the right thing and now it's back like it was and CTRL-S works again.

    Another thing just noticed is that copy and past works with Micropython in this kind of terminal.
    Very handy. So that, along with the escape sequences working better has me sold on this.
    It's just the strangeness of backspace working like del and ctrl-h needed for backspace this is the downside so far...

Sign In or Register to comment.