• 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.

  • This seems more like a bug in StaSh to me. Somewhere in stash/bin/tar.py, os.path.abspath() is called with an argument of None. From briefly looking at the code, I'm guessing the -f/--file argument wasn't passed to the tar command as it expected.

  • @JonB I mentioned that as a known issue a while back (first beta, I think), it's still on my todo list.

  • It looks like you have a script of your own called ctypes.py in a "temp" folder. Naming your scripts like built-in modules is never a good idea, try renaming it to something like ctypes_tests.py (and restart Pythonista if that doesn't help right away).

  • @omz Great, thanks. I'm the future I'll report without replying.

  • Sorry, was stupid mistake not reading correctly. Is the section to create extensions :( was thinking about file extensions. Opps

  • Thanks! I think I wouldn't have noticed this myself because a German date picker looks pretty normal to me...

    The reason is a workaround for a bug in the iOS simulator – I'm faking a German locale because for some reason, the keyboard language can't be changed otherwise. This obviously should never have been in the version that's built for actual devices...

Internal error.

Oops! Looks like something went wrong!