Kinda. While there is no API to make a phone call, you can use the
webbrowsermodule to open a
tel:PHONE_NUMBERurl. This will show a dialog, asking for confirmation to initiate the call. This should work for you since, when the call ends, you automatically return to Pythonista.
For example, this code makes a call to Amazon Germany:
import webbrowser webbrowser.open('tel:+49-800-2629663')
@scj643 because it doesn't know. The objc runtime can only get the expected type encoding of an argument or a method's return value. The type encoding specifies which primitive type an argument should be (
char/etc) or whether it is an object. But since ObjC classes are basically just glorified
structs, the runtime can't differentiate between different classes. (That's why objc has the
idtype to represent "any objc-object")
It'd be nice if Pythonista offered Apple's
SF-Monofont in addition to the existing fonts.
Another font that'd be very well suited for Pythonista is
FiraCode, which is a monospaced font with programming ligatures.
UITextViewalready supports ligatures, FiraCode would work fine in Pythonista.
Example of FiraCode:
Pythonista already includes a "draw image and save to camera roll" script in the examples folder. You might be able to learn from that how to save the contents of your view to an image.
You can find the example script at
Documents -> Examples -> User Interface
The built in
ui.TableViewsupports only one action per row, but you can use the
objc_utilmodule to create a custom
UITableViewand implement the
-[UITableViewDelegate tableView:editActionsForRowAtIndexPath:method which returns an array of table view row actions.
An other option for multiple actions per row would be to simply add an info accessory button to each row and show an alert w/ more options when the accessory button is pressed
I noticed that the "Import file" feature of the app extension seems to be a bit inconsistent:
When I launch the extension from the share sheet in the Photos app, the import option is hidden, while it is available when I launch the extension from Pythonistas own share sheet or an app like Transmit.
The problem seems to be that the photos app only specifies the
public.pngkey, while pythonista itself (and presumably Transmit as well) specify the
I think Pythonista should offer the "Import" option in both cases.
The "Import File" option:
The items passed to the extension: