• @dgelessus, big thank you for this write-up. Good to understand the concepts even though I have limited need for C interaction at the moment.

  • @nicktimebreak @wnMark @mikashkin The Today widget was removed in the release version of Pythonista because it was too unstable - many scripts required more RAM than iOS allows for Today widgets. If you're really interested in my script, you can run it normally in Pythonista, it will appear as a normal sheet view. Trust me, you haven't missed much :)

  • Update: enable_faulthandler now also sets an Objective-C uncaught exception handler, which logs the Objective-C exception details and C call stack. The Objective-C exception handler works in Pythonista 2 and 3, but you get a Python traceback (in addition to the C call stack) only in Pythonista 3.

  • I have this behavior too. I don't really care, though, I almost never use forward delete ever on any device.

  • @dgelessus

    Does this forum software not support full deletion of threads? All the spam threads still exist, they only have their OPs deleted.

    It does. I've just deleted the spammer accounts completely, and the threads all disappeared.

  • One nice thing about the sidebar was that it could be narrower than 200 pt, so a 30 or 40 pix wide sidebar worked well for creating custom auxilary shortcut bars in the editor without sacrificing too much width. But so much more can now be done in objc, I am not complaining.

  • It's also #26 on the top charts in Productivity (US)

  • Not from the console, that's still a normal Python prompt. Inside the pip package there is a __main__.py file, which is the main pip program. If you tap and hold the play button you can pass arguments to the program, so if you would normally run pip install requests you'd write install requests into the arguments field.

  • On a slightly related note, it looks like sys.path is reset every time a script is run (even an editor action) without reloading site again, which means that any previous sys.path changes from site (including .pth files) are lost until site is manually reloaded.

  • The original version no longer works in Pythonista 3. It seems that the dir function now converts the return value of __dir__ to an actual list, instead of allowing a subclass. This is the updated version:

    import sys import types class DirAllTheGlobals(types.ModuleType): import __main__ def __dir__(self): return dir(type(self).__main__) # THESE LINES MUST COME LAST. # Anything past this point is executed in the context of the old # pythonista_startup module, which may already be partially # garbage-collected. new_module = DirAllTheGlobals(__name__, __doc__) vars(new_module).update(vars(sys.modules["pythonista_startup"])) sys.modules["pythonista_startup"] = new_module

    This should also still work in Pythonista 2.

    @omz please can you add the option to keep globals back?

  • Hm, it seems that the feed only contains the latest post in each thread. Any replies before that are not in the feed. At least I'll notice when there are new replies, but I still need to check my "inbox" manually to follow the entire discussion.

  • Perhaps not technically a bug, but a common source of incompatibilities:
    sys.stdin, std.stdout, and sys.stderr should have an isatty() method which returns false. This might not technically be a "bug", since python docs don't seem to require all file methods to be implemented, except maybe read and write, many other external libraries assume a file-like object.

  • This still seems to be a problem.

  • I have passed all the files through two porting tools, futurize and python-modernize and the code is now pushed as the py3 branch.

    The codebase is mostly just processed by tools without any manual checking. So I doubt it would just run with Python 3 or even Python 2. But it serves as a starting point nonetheless.

    @dgelessus sorry for hijack your thread. I'll post update on this thread onwards.

  • I agree. I actually emailed @omz to request that the folders shown be made collapsible. It becomes a problem as soon as you install a single outside library. It seems like the most intuitive "move" interface would be the same sidebar used for navigation.

  • So that's why I didn't find anything on Wikipedia... I searched for "atomic", which led to a disambig page that didn't have the "Atomicity (programming)" article linked. Thanks for pointing me in the right way.

  • The problem I think is that your flush() is inside the ui loop, nude red events maybe are getting things out of whack, like the content size perhaps doesn't get updated until after you leave the loop? I found a delay works, as does in_background. Replace your original set to this.

    @ui.in_background def scroll(): self.out.content_offset = (0, self.out.content_size[1] -self.out.height) # this is the bugged line scroll()
Internal error.

Oops! Looks like something went wrong!