Questions tagged [pythonista]

Pythonista is an integrated development environment for writing and executing Python scripts on iOS. It supports most standard modules and includes many specifically designed for using with or automating iOS.

Pythonista is an integrated development environment for writing and executing Python scripts on iOS. It supports most standard modules and includes many specifically designed for using with or automating iOS.

Description from Official Site

Pythonista is a complete development environment for writing Python™ scripts on your iPad or iPhone. Lots of examples are included — from games and animations to plotting, image manipulation, custom user interfaces, and automation scripts.

In addition to the powerful standard library, Pythonista provides extensive support for interacting with native iOS features, like contacts, reminders, photos, location data, and more.

Useful Links

96 questions
2
votes
0 answers

Listen to MediaPlayer Change Notification in Pythonista

How can I listen for MediaPlayer notifications in Pythonista? I've tried this, but Pythonista crashes when the media changes. import ui import time from objc_util import…
Cameron
  • 56
  • 5
2
votes
1 answer

Can Pythonista projects with GUI be made into an executable file and run on iPhone?

I have been writing little calculator programs on my iPhone that do arcane calculations, used by machinists to make fancy metal parts. I have been making GUIs, and writing the code in Pythonista on my iPhone, but I can't figure out how to make the…
Forrest T
  • 31
  • 3
2
votes
0 answers

How Come Pythonista's Notification Module Won't Honor My Sound Choice?

I'm using Pythonista 3, and the built in notification module. When I run the script, and sleep the device, it uses the default sound instead of the one I passed in to the schedule function. For the sake of argument (with myself, of course. Who…
General Nuisance
  • 211
  • 3
  • 16
2
votes
1 answer

Pythonista: How can I present a UIAlertController?

I am working on a Pythonista script that displays a UITabBarController, which contains multiple UINavigationControllers, containing UITableViewControllers. At some point I need to display a UIAlertController, but all the methods I've tried to…
Benjy Wiener
  • 1,085
  • 2
  • 9
  • 27
2
votes
5 answers

SFTP Upload via Python and Pythonista with Paramiko. Can't create directory/subdirectory

I'm trying to upload an image to my uploads folder on my remote server. The folder structure is always uploads/year/month/ and I can't get paramiko to check if the folders exist and if not make them. SSH connection is working, uploading a file is…
patrick
  • 574
  • 3
  • 10
  • 25
1
vote
0 answers

How to make pygame on Apple ipad ( ios 15 )

I am a coder in python. I was using pythonista and I saw a lot of people using the Scene module, but can I use pygame module? I used Stash to install, but it doesn’t work of running the last step: setup, init. I tried this code in stash: $pip…
YYSY
  • 11
  • 3
1
vote
1 answer

What is the property use of Node.remove_action in Pythonista?

I can’t seem to understand what key is that it required. Using Node,remove_all_actions just remove like everything. So I need something that could just stop specific action. Here is the code I test on: import sound import random import math A =…
Rog Kil
  • 13
  • 2
1
vote
0 answers

Using speedtest or speedtest-cli on Pythonista

I am trying to make an iOS shortcut that would notify me of the current internet speed. I thought of using speedtest module on Pythonista 3 by installing it using StaSh. pip install speedtest Querying PyPI... Error: Version not found: speedtest I…
aarnavg17
  • 19
  • 2
1
vote
1 answer

How do I take pictures from Pythonista and them export them into a specific album already on my iOS device

I already have the body of my code in which I can create an album and then take a picture directly from Pythonista. After that, I would want to take this recently took picture and transfer it into the album that I just created. This is what I…
1
vote
0 answers

Return name of current foreground app in Pythonista IOS Iphone

Background: I am creating automation of my phone that only allows apps to be run based on certain criteria. This automation is for the purpose of preventing bad habits like constant social media use. E.G. my automation would block accessing…
Matt Nann
  • 55
  • 1
  • 6
1
vote
1 answer

Cannot install Pymongo on Pythonista3 for iPad due to TypeError

I've tried using StaSH in order to install Pymongo but it fails due to the setup.py file erroring. I've even tried installing Pymongo from source by running the setup.py file, but both methods give me the following error: TypeError: int() argument…
1
vote
2 answers

Pythonista 3 doesn’t show iCloud files created on MacBook Pro

Description: Using the menu Script Library > iCloud in Pythonista 3 on iPad shows .py files created in Pythonista, but not files created in another IDE and saved to that iCloud folder Steps to reproduce: create .py file in an IDE on MacBook…
Rick Gladwin
  • 4,225
  • 1
  • 17
  • 21
1
vote
1 answer

Run Scrapy on iOS/Pythonista?

Is it possible to run scrapy on iOS with something like Pythonista? My script works on my pc but I would like to start it from my iPhone.
Steve H.
  • 21
  • 3
1
vote
1 answer

How to make Siri read the return value of a Pythonista script?

I wrote a python script that checks the trains for me from home to the office and vice versa. For now it accepts input like tomorrow, today, around X hour etc. and it works like a charm. However the problem is when I say: "Hey Siri, check me a train…
Kamil Latosinski
  • 756
  • 5
  • 28
1
vote
4 answers

Return a function with parameters

I am trying to make a function that returns itself with parameters. Def a (x,y): *code* Return a(x,y) this returns an error when I try to run it. >>> a(1,2) RecursionError: maximum recursion depth exceeded What I want is >>>…
John
  • 23
  • 5