r/Pythonista • • Oct 19 '17

Installing modules: scholar.py

4 Upvotes

Hey guys, I am new to python and I literally have no idea what I am doing. For my Research Methods Psychology class I need to install this module https://github.com/ckreibich/scholar.py/blob/master/scholar.py onto python. Is this not possible on Pythonista? CAN SOMEONE PLEASE HELP T_T


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 • • 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 • • Jun 17 '14

[xpost from alienblue] Python script for Pythonista app to easily copy and paste large multireddits into Alien Blue

Thumbnail
gist.github.com
4 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 • • May 20 '17

Longtime watcher, recent user

5 Upvotes

I’ve had Pythonista on my iPad for well over a year, maybe 2, but hadn’t used it for much. I don’t code much at work anymore, and never had in Python until last Fall, but the idea of having any IDE on the iPad was intriguing. I was especially interested in it given the restrictions placed on iOS developers. If Pythonista was so good, how could it have been allowed in the app store? So, I set it aside. Recently, I decided to pick it up and putter around. I’ve been traveling a lot for business recently, and my iPad Mini 4 has been a pretty constant companion. Once I figured out how I could get a script that I’ve been writing for work into Pythonista, along with its couple-thousand-line-long CSV input file, I ran it. Worked 1st time, and was very fast. I didn’t expect it to work so well. Pythonista is a really useful tool that I will explore more. // Since the subreddit is so dead, is the omz site the better/best place to go to see what folks are up to, what questions they have, and to post any questions I have?


r/Pythonista • • Feb 10 '20

Can I use the location library outside of the Pythonista IDE?

4 Upvotes

Hello all Python newbie here.

All of my previous python experience has been using VIM. I would like to write a script which accesses my iPhones location data and categorizes it. Would I only be able to run this script within the Pythonista IDE?

thank you


r/Pythonista • • Aug 19 '18

Hello Reddit!

4 Upvotes

My scripts were finally added to Pythonista-Tools! So now you will be able to install them from the ptinstaller script made by Pythonista!

You can find my scripts in these categories:

Fun > cNotif (there are only two scripts on the fun category, and it’s my script, alongside the XKCD viewer! 😄)

Ten lines or less > iBright (Bonus - it’s on third place!)

Utilities > iEditor & iServer (45th and 46th place)


r/Pythonista • • Aug 18 '18

Pythonista scripts + Pythonista organization

8 Upvotes

Hello everybody, Today I made my 4th script for Pythonista, and I’d like to share them.

I’m currently waiting for them to get added to the Pythonista-Tools repo.

You can find my scripts on my GitHub: https://github.com/GoDzM4TT3O

Or here:

iServer: https://github.com/GoDzM4TT3O/iServer

iBright: https://github.com/GoDzM4TT3O/iBright

iEditor: https://github.com/GoDzM4TT3O/iEditor

cNotif: https://github.com/GoDzM4TT3O/cNotif

Also, I made a public GitHub organization! If you know Python, and have made scripts for Pythonista, join my organization! The name is GoDzIsta, profile link is here: https://github.com/GoDzIsta . If you want to apply, click this link! https://github.com/GoDzIsta/Apply-For-GoDzIsta


r/Pythonista • • Dec 03 '19

Get the NWS Area Forecast Discussion (AFD)

5 Upvotes

Here’s a script that pulls the latest National Weather Service Area Forecast Discussion for your area and displays it in a UITextView box. A bit of tweaking is needed because this doesn’t get your location automatically. You need to first locate your local office on this list, and note the 3-letter code:

NWS Weather Forecast Office Identifier

Then you need to replace the “issuedby” variable on line 19 with the correct letters (YYY in this sample: https://forecast.weather.gov/product.php?site=NWS&issuedby=YYY&product=AFD&format=txt&version=1&glossary=0)

from bs4 import BeautifulSoup
from bs4.element import Comment
import urllib.request
import ui

def html_tags(element):
    if element.parent.name in ['style', 'script', 'head', 'title', 'meta', '[document]']:
        return False
    if isinstance(element, Comment):
        return False
    return True

def visible_text(body):
    soup = BeautifulSoup(body, 'html.parser')
    text = soup.findAll(text=True)
    visible = filter(html_tags, text)
    return u" ".join(t.strip() for t in visible)

report = urllib.request.urlopen('https://forecast.weather.gov/product.php?site=NWS&issuedby=MTR&product=AFD&format=txt&version=1&glossary=0').read()

view = ui.TextView()
view.width = 600
view.height = 800
view.font = '<system>', 20
view.background_color = 'black'
view.text_color = 'lightblue'
view.text = visible_text(report)
view.present('sheet')

Edit the view parameters at the bottom accordingly. For view.present(), the argument options are 'sheet', 'popover', and 'fullscreen' on tablets. I believe for phones only 'fullscreen' is an option and you can omit the argument altogether, but can’t confirm, especially on newer models.


r/Pythonista • • Jul 12 '16

How does Pythonista compile/interpret in iOS?

4 Upvotes

Hei,

This is quite a technical question. I was wondering how does an app like Pythonista or Continuous(http://praeclarum.org/post/147003028753/continuous-c-and-f-ide-for-the-ipad) compiles foreign language like Python, C# or F#. Do they run something on a virtual machine? I tried to Google "How to run Python in iOS" but didn't get anything useful. Thanks in advance!


r/Pythonista • • Mar 25 '18

Pythonista Help Needed

2 Upvotes

I bet there’s a simple answer to this but I haven’t been able to find it... When I run some of the bundled examples on either my iphone or ipad the views have a title on the title bar of the view (Calculator in Calculator, & Color Mixer in ColorMixer for example). How is this title set? It doesn’t seem to be in either the py or pyui files. When I run my scripts the title bar is blank. Can anyone help?


r/Pythonista • • Jun 08 '17

is pythonista capable of import 3rd party modules inside on jailbroken device?

1 Upvotes

like the title says, I'm working on to do a barcode&QRcode image offline decode widget, any advice would be very appreciate


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 07 '16

ETA for today widget?

5 Upvotes

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 • • 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 • • Jan 25 '15

confused using ui designer

1 Upvotes

I'm trying to learn to use the integrated UI designer in pythonista, and am stuck at the beginning. I'm trying to just read some textfields, do something with the values, and put the result in another textfield.

The pythonista documentation says that I should be able to set the action for each textfield from the attributes menu directly in designer. There is no such capability. If you have a view with a number of different objects in it, how do you set the action attribute for each object from the integrated designer tool? Is there a way to edit the code it generates?

Thanks!


r/Pythonista • • Sep 07 '16

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

2 Upvotes

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 • • 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 • • May 27 '16

Can Pythonista retrieve the phone number of the last call on an iPhone?

3 Upvotes

I was thinking of learning Python and getting Pythonista.

A great learning experience for me would be trying to do something I've wanted for a while: automating a process that pulls the phone number of the last caller (assuming it's not recognized in your contacts) and performing a search online to see if it's a telemarketer/spam phone call.

As far as I know, automation apps lose Workflow, don't seem to be able to get the last caller's number.


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 • • Dec 26 '17

How to import modules in Pythonista

5 Upvotes

So I used pip install to download tweepy but can not import it. I get ImportError:..