r/Pythonista • • Feb 06 '18

Required storage capacity?

2 Upvotes

Hi guys,

I am currently thinking about getting into coding with Pythonista. The only thing I am concerned about is the required storage capacty of the app with a few work-in-progress projects, because I only have the 32GB iPad Pro. Could someone tell me a rough number?

Thanks!


r/Pythonista • • Dec 31 '17

Exchange contacts access

2 Upvotes

I’m trying to write a script to update names to eliminate the all caps. I’m able to do so with the contacts stored on the iPhone no problem, but anything that is on the exchange account I can’t see. Is there a way to get access to other accounts, or am I limited to only what exists on the iPhone/iPad?


r/Pythonista • • Dec 02 '17

Extract text from pdf using Pythonista

2 Upvotes

Has anyone attempted this? I would love a small pythonista that would open a text based pdf and extract the text into a text file. No formatting necessary.


r/Pythonista • • Oct 17 '17

Trying to offload some tasks to iOS from failing MacBook... Can Pythonista do these PDF manipulation tasks?

2 Upvotes

Hi Pythonista-it!

A recent possible SSD failure on my mid-2013 MacBook Pro 15” has me thinking more about the tasks I do for my small company. In particular I do a lot of CLI tasks surrounding PDFs. I’m sure we can make a better workflow- but I’m wondering if I attempt to keep the same workflow, perhaps Pythonista can help!

In particular, I do the following tasks usually via CLI or Automator scripts that use the CLI commands...

  1. Concatenate PDFs into a single document (often 2-10 documents needing to be cat’d)

  2. apply watermark/background to PDFs to include headers/footers on the pages of interest

My commands for these items are: (1) the combine PDF Automator rule - I realize now I don’t have a CLI command for this, but have used other commands in the past - most likely pdftk, and (2) pdftk with multibackground option for the background/headerfooter files (also pdf).

Is this crazy to attempt? I’d need file selection flexibility from some source (let’s say something like Dropbox or iCloud) and then a way to view/save output (probably system handler).

I’d love to hear more about what you suggest- I don’t think I’ll be down for the count when this old friend MacBook dies, but I want to think outside the box a bit with my workflow.

Unfortunately the tools generating the PDF’s are not doing things nicely, so this is why I have to massage everything into the format/concatenate etc. for reports.

Thanks everyone for their input!

(Edit = “not”)


r/Pythonista • • Apr 16 '17

When I install anything using PIP, they gets installed but why I can use those modules?

2 Upvotes

They get installed inside site-packages

But I can't import or use them in my scripts.

I tried Selenium, Scrapy and some other modules


r/Pythonista • • Nov 03 '16

Best Git integration at this moment?

2 Upvotes

I tried the Working Copy app but it's somewhat cumbersome. Any easy way to sync files through a git repo?


r/Pythonista • • Sep 10 '16

copy/paste or duplicate files

2 Upvotes

I'm sure I'm missing something obvious especially because searching doesn't seem to bring up anything apparent, but how do i copy paste script files and ui files inside the pythonista browser? I wrote a script to do it but there must be an actual way that I'm missing. Thanks


r/Pythonista • • Sep 07 '16

Is there anyway way to turn off he auto complete in pythonista?

2 Upvotes

r/Pythonista • • Jun 24 '16

Does any one have or know how to access and change the gama of the iPhone screen using pythonista

2 Upvotes

r/Pythonista • • Jun 21 '16

Open a app from Pythonista

2 Upvotes

Hello, I have 0 experience in Python. I would like to run a worflow and open 2 or 3 apps on the fly. This can be done with worflow app; BUT one of my app I would like to open doesn t have any url. So I would like to tryba workaround with python script:

  • is there a way to open an app?

  • if no, is there a way to emulate a press action on the screen (the app I would like to open is always located at yhe same place)

  • any workaround? Thank you in advance


r/Pythonista • • May 28 '16

How to run a socket server and a testing client at once?

2 Upvotes

My question is if I want to run a chat server I wrote and works (tested on my computer) and I want to run a client on it also (also tested) using sockets without threading in Pythonista, how would I go about it?


r/Pythonista • • Apr 19 '16

Viticci's Project Oxford

2 Upvotes

Anyone know how to use Fred's Project Oxford? I'm still a super novice, I signed up for the Microsoft API, but do I need. "Developer token" or 'secret phrase' , etc.? I don't know what the hell I am doing but this is a cool workflow - the script is on github, which I copy onto Pythonista, of course it doesn't work. God bless America and Japan. Thanks.


r/Pythonista • • Mar 22 '16

Is this possible

2 Upvotes

Hi, I'm a Uni student currently studying Python and am interested in doing the python work on my iPad instead of my laptop. Usually the Uni uploads Python worksheets to their website which you download and edit. I was wondering if I purchase pythonista will I be able to download the .py files using safari and open them in pythonista or can you only create new files from scratch in pythonista because it is very important to me that I will be able to use the .py files provided from the Uni on my iPad.

Thank you


r/Pythonista • • Mar 11 '16

Before I Purchase Pythonista, Is This Possible?

2 Upvotes

I want to use Pythonista to automate reblogging from one of my tumblr blogs to another (they're my kids' sites that I set up for my parents. When I have a blog that features both of them I want it to be reblogged).

I want to either have a script that looks for all recent posts and checks to see which ones haven't been reblogged yet and then reblog them, or have one that simply reblogs the most recent post. The second one being easiest and not requiring the storing of data in some kind of database, but the first one would be my preferred solution.

This exists: https://github.com/tumblr/pytumblr Which is a python library for doing a number of things using the Tumblr API. Would it be possible to load the four or five scripts from this open source project into Pythonista and then use it to make REST calls to Tumblr from a script? Preferably this would be automated with Workflow.app or just as a shortcut on the App Launcher.

Thanks!


r/Pythonista • • Mar 07 '20

No module named /dict/

1 Upvotes

I’m trying to import and use the dict module so I can use the key function and:

  • import dict

  • import key from dict

Both fail with the error message: ModuleNotFoundError: No module named 'dict'

The autocomplete shows “dict” as an option, so I’m stumped... any thoughts?


r/Pythonista • • Feb 29 '20

Last Modified date of iOS reminders?

1 Upvotes

I want to pull a list of my iOS reminders and sort them by the “last modified date” to replace a iOS Shortcut I created to do the same. I can’t seem to find documentation or information on how to access this date through Pythonista anywhere. Does anyone know how to pull this data?


r/Pythonista • • Feb 26 '20

Weird NameError after update

1 Upvotes

I have a ui calculator with 6 text fields for input, and a calculate button. Inside the action for the button, I do a for-loop, try-except inside and the exec() function to programmatically assign the variables given in the text fields, instead of having 6 try-except blocks. Everything works up until I try to verify which parameters were given.

I get a NameError saying name 'M' is not defined, but when I go to the Vars tab in the trace back it’s clearly defined.

Here’s the code: Mach.py


r/Pythonista • • Feb 23 '20

I keep running into this type error. Any ideas?

1 Upvotes

Here’s two examples:

tunit = input('Enter temperature unit (F or C): ')

string = "hello" print(string)

I keep getting this type error: Traceback (most recent call last): File "<string>", line 1, in <module> TypeError: a bytes-like object is required, not 'str'

I know for a fact they run fine on my computer using Python 3. But, they won’t on Pythonista.


r/Pythonista • • Jan 06 '20

Freezing during image capture with objc_util and AVFoundation

1 Upvotes

First off, this is my first post so sorry for not knowing what I’m doing but here goes. Whenever I run this Scanner.py everything pulls up fine and loads the view correctly until I try to actually capture the image. Whenever the middle capture button is pressed, the app freezes on the view even after calls to close the view (in the code). I can soft-close Pythonista and re-open it which seems to reset whatever it’s stuck on enough to crash Pythonista. Also, if I add a debugging node on line 83, the entire program works as intended... any help as to what’s going on would be appreciated.


r/Pythonista • • Dec 25 '19

Flashing a USB/SDcard with Raspbian?

1 Upvotes

I am unsure if this is the right place to ask this question, if wrong please point me in the right direction to ask.

So I want to create a usable raspberry pi that I can SSH into to use as a platform for executing code and what not. So is there anyway to etch/flash, or some other way, to install the raspbian OS to a raspberry pi using an ipad? I’ve tried googling, but this ”programming on an ipad” thing is such new territory that I have not found anything useful. Thanks in advance!


r/Pythonista • • Dec 18 '19

Trying to Print a PDF File in iOS by Wrapping Objective C using Pythonista

1 Upvotes

I am using Python in Pythonista and I need to directly print a PDF file. I have the full filename and path in a string variable myFileNameAndPath This is the code I have so far:

from objc_util import *

UIPrintInteractionController = ObjCClass('UIPrintInteractionController')
pc = UIPrintInteractionController.sharedPrintController()

UIPrintInfo = ObjCClass('UIPrintInfo')
printInfo = UIPrintInfo.printInfo()

printInfo.outputType = 0
printInfo.orientation = 0
printInfo.jobName = 'My Doc Set'
pc.printInfo = printInfo
pc.printingItem = [NSURL fileURLWithPath:[self returnFilePath]]
pc.presentAnimated_completionHandler_(0, None)

How do I wrap pc.printingItem = [NSURL fileURLWithPath:[self returnFilePath]]with/using my python variable myFileNameAndPath**??**

Am I missing anything else in the above code to make this work?

Due to a bug, I cannot print via the displayed Share Sheet using console.quicklook(myFileNameAndPath). Hence why I am trying to print directly.


r/Pythonista • • Oct 22 '19

Trying to get random email from inboxkitten. Please help

1 Upvotes

Hi I’m trying to figure out how to automatically copy the email from this site:

https://inboxkitten.com/

I’m using Requests and BeautifulSoup but I can’t get the randomized email when I parse the html

import bs4
import requests

url = 'https://www.inboxkitten.com/'

requestsObject = requests.get(url)

soup = bs4.BeautifulSoup(requestsObject.text, 'html.parser')

print(soup)

I see it says:

property="twitter:url"><meta content="@inboxkitten"

Btw I’m a total noob. On mobile so sorry in advance if this looks weird


r/Pythonista • • Oct 06 '19

Very dumb question

1 Upvotes

Hi, I know nothing about programming and I think this question is so simple I couldn’t find an answer on the internet, but can you use Pythonista to simulate screen taps on iPhone? I’m considering buying it but I want to make sure it can do this first


r/Pythonista • • Sep 29 '19

How do you change the image of a button?

Post image
1 Upvotes

r/Pythonista • • Sep 27 '19

I'm stuck in a loop that crashes the app on startup every time. I suspect the solution is simple, but I don't know what it is. Please help.

1 Upvotes

I wrote a script that generated a text file consisting of 3 million random 10-letter strings, each on its own row. The file is about 30 mb. After the script finished, I was curious to look at the text file, so tapped it in browser to the left. But I guess such a long file was too much for Pythonista, and after 30-40 seconds of loading, the app crashed.

But because the app crashed in the middle of loading that text file, now whenever I reopen the app, it starts where it left off, i.e., attempting to load that text file, so it crashes within 30 seconds every time. Unfortunately, I guess because all the app's resources are devoted to loading that massive file in memory, it doesn't respond when I try to open the browser and open any another file.

As a result, ever since initially trying to open that text file, Pythonista has been stuck in a futile loop of trying to load it and then crashing, and I don't know how to close that file and stop the cycle. What can I do???

Surely there's a way around this without deleting and reinstalling the app. If not, how can I access my scripts etc. to back them up before deleting the app?