• The issue happens to me almost 100% of the time when doing up-down or down-up with the keyboard arrow keys.

    I’m not sure whether it ever happens in other cases.

  • @cvp @7upser

    we might need to look into out objc_util module this might be the third ocurance that ive see that Apple changed API and renders our use incapable. i tried all i could and i get the same error stating the method doesnt exist.. but i did see that there might be a work around to use old ios12 styling only mjor featur that i saw that you lose is darkmode. you will only get the light mode ]. below is what i sawvabout this. its from @7upser 's link i believe its refering to swift code im not sure... but its the best i could find

    To get back iOS 12 appearance

    I wasn't able to tint the color of the selected segment, hopefully it will be fixed in an upcoming beta.
    Setting the background image of the selected state doesn't work without setting the background image of the normal state (which removes all the iOS 13 styling)
    But I was able to get it back to the iOS 12 appearance (or near enough, I wasn't able to return the corner radius to its smaller size).
    It's not ideal, but a bright white segmented control looks a bit out of place in our app.
    (Didn't realise UIImage(color:) was an extension method in our codebase. But the code to implement it is around the web)

    extension UISegmentedControl { /// Tint color doesn't have any effect on iOS 13. func ensureiOS12Style() { if #available(iOS 13, *) { let tintColorImage = UIImage(color: tintColor) // Must set the background image for normal to something (even clear) else the rest won't work setBackgroundImage(UIImage(color: backgroundColor ?? .clear), for: .normal, barMetrics: .default) setBackgroundImage(tintColorImage, for: .selected, barMetrics: .default) setBackgroundImage(UIImage(color: tintColor.withAlphaComponent(0.2)), for: .highlighted, barMetrics: .default) setBackgroundImage(tintColorImage, for: [.highlighted, .selected], barMetrics: .default) setTitleTextAttributes([.foregroundColor: tintColor, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 13, weight: .regular)], for: .normal) setDividerImage(tintColorImage, forLeftSegmentState: .normal, rightSegmentState: .normal, barMetrics: .default) layer.borderWidth = 1 layer.borderColor = tintColor.cgColor } } }
  • Thank you for the info

  • Yeah, FIFOs are strange, I don't think there's any use for them in Pythonista. A FIFO works kind of like a normal pipe in a shell - one side writes to it, the other one reads from it. (Usually the two sides would be different processes, but you can probably do it in a single process if you use threads or non-blocking IO.) The reason why Pythonista froze when you opened the FIFO is because the editor tried to read the file contents, but because there was no writer attached to it, the read (or possibly the file open) blocked forever.

    I don't know why Pythonista crashed when you tried to do anything else with the FIFO - my guess would be that the file manipulation methods that Pythonista uses don't handle FIFOs properly. I also have no idea why safe mode helped (I thought it did the same thing as pythonista3:// - disabling pythonista_startup and closing all editor tabs) but I'm not going to complain.

    In case safe mode ever doesn't work, there is another way you can get rid of a problematic file. Pythonista's share extension has full access to all files stored in the app, so you can use the Python console there to delete the file. The share extension has much fewer features than the main app, and the file browser and editor aren't loaded by default, so it's much less likely to crash than the main app.

    If that doesn't work either, and you have purchased the old Pythonista 2 when it was still available, you can use it as well. Although you can't see Pythonista 3 files in Pythonista 2's UI anywhere, both versions share the same storage location internally. In Pythonista 2, Pythonista 3's files are located at os.path.expanduser("~/Pythonista3/Documents"). The chance of a Pythonista 3 file crashing Pythonista 2 is basically zero, because Pythonista 2 never looks at Pythonista 3's files (unless you do so manually using Python).

    If that isn't an option either, you can make a backup of your device using iTunes, and then use a tool like iFunbox or iExplorer to extract your Pythonista files from the backup. (I honestly don't know how either of those tools deal with FIFOs and other special files in backups, or if iTunes even backs such files up. If special files cause issues when extracting, you can manually copy out all files except the problematic special files.) Once you're sure that you've gotten all your data out, you can delete and reinstall Pythonista and copy all of your data back.

  • Works great, thanks

  • @technoway Python actually has a built-in limit on how deep the Python call stack can go. You can get the current limit with sys.getrecursionlimit() and change it with sys.setrecursionlimit(limit). The default limit is 1000, which is normally enough that you don't overflow the native stack even if you hit the Python recursion limit. In Pythonista that seems to be too much though, if I run an infinitely recursing function with the default limit, Pythonista crashes. With a lower limit (such as 500) I get a Python RecursionError as expected. I have no idea what the size of the native stack is on iOS, but it's probably lower than on Mac.

  • Smart punctuation is a new feature in iOS 11. The developer API is opt-out, so I'll have to disable it for the Pythonista editor in the next update, even though I never opted into it. :/

  • @0x77 I do not know if it helped this time but I often find that creating that minimal script removes all the cruft and allows you to see where the problem(s) lie. Sherlock Holmes once said something similar.

  • Pythonista is iOS only. The feature are described at http://omz-software.com/pythonista/ and http://omz-software.com/pythonista/docs/ios/ The modules like ui, scene, and canvas allow you to build iOS apps in Python. The inclusion of NumPy, Matplotlib, Requests, BeautifulSoup, Flask, Jinja2, Pillow, etc. are also quite powerful.

  • The release has been submitted, you might see it on the App Store soon @SimCityWok

  • I reported that for Pythonista 2 and it was fixed for the Pythonista 2 beta.

    But this time it is for Pythonista 3's python 2 interpreter. Sorry if this caused any confusion.

  • Thanks, I'll look into that.

  • @hyshai and @shaun-h Did the sys.stdout changes in the current betas also break the two youtube-dl implementations in Pythonista-Tools or is it just user error on my end?

  • @ahenry91 I'd really love to see enough keyboard shortcuts in Pythonista that the editor, with a bluetooth keyboard, could be navigated entirely by keyboard shortcuts, without ever touching the screen.

    A more complete set of key commands wouldn't be hard for @omz to implement, I guess it's just not a top priority. Anywho, this is something I'd like to see in the next update after Pythonista 3.

Internal error.

Oops! Looks like something went wrong!