Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Help with Menu/window for Pythonista..
-
I have a python program that I run on the Iphone. The script scrapes a website and create a "gauge" image that I would like to be able to display in a pop-up window. In that window I would like the option to share, save, and close the window. Since there are 11 different projects, The main ui would be a series of buttons that would each call the script with specific parameter for each project, create the gauge, and display in a window. Closing the window on the iphone should return to the main ui with the project buttons. Would be greatful for any examples out there that I could get me started in the right direction.
Thanks In Advance
Mark -
Here is a link to sample gauge
-
You can make your image above appear inline by editing your post to change
dl=0
toraw=1
at the end of the url.EDIT:

You could think of your menu view as a NavigationView and then you can use
.push_view()
to show one of your gauges and then.pop_view()
to return to the menu. -
Another option might be to create all guages in a scrollview, and use the paging_enabled parameter, to allow swipe action. You might consider having the guages be Buttons, so tapping would then pop up your Share/Save/Close menu. Or else, you would have ButtonItems for Share, Save, etc.
-
This post is deleted! -
@ccc THANKS! for your help. I will have a closer look at NavigationView and thanks as well for the tip to get the image appear inline with post.
https://www.dropbox.com/s/dcvwbpdac20subj/IMG_1765.PNG?raw=1 -
@JonB Thanks. As it is now, I have all 11 project gauges appear one after the other in a long stream so I can scroll up, however I think your paging_enabled idea is a great one which would allow the swipe action. It works well now, but trying to expand my knowledge about Pythonista and this is very helpful.
-
See the EDIT above. Sorry about that.
-
@ccc, Got it! THANKS!!!!!
-
So your use case is to measure water levels in various reservoirs at different altitudes?
https://en.wikipedia.org/wiki/Foss_Reservoir ?? I originally thought FOSS was Free and Open Source Software but probably not in this context.
-
That is correct. Actually we have 11 reservoirs located in Oklahoma, Texas and Kansas. The reservoir status which is updated hourly is pulled from a website, and used to create the gauges on demand. The text background changes to match which pool the reservoir resides in at the time, blue is conservation pool, yellow is flood pool, and red is surcharge pool, all different levels behind a dam as shown
Probably way more than you wanted to know about dams ;-) Thanks for your help -
@mtrevino57 , just a idea. Have you seen Status Board by Panic, Inc.
https://appsto.re/au/qBC0A.i
It's pretty cool. If you used Pythonista to gather the data and write out json data to somewhere on your interval, then the Status Board clients are pulling thier data rather than you pushing. Also nice to put to Apple TV.
Anyway, it's just a thought -
@Phuket2, Thanks I will have a look at the app! Currently the data is pulled when the python script is run and the gauges are generated at the time the script is run. Running on a set interval might be helpful in that when a reservoir goes from conservation to flood pool an alert could be generated.
-
@mtrevino57 , yes understand. Look it's still great. This is just a slightly twisted way. But in this scenario, when your script runs you would just write our a json file. The clients would just look at the latest json file, also if the gauge can not be reproduced as you would like it in the status board, you could also save a pic.
Anyway, just saying. I can just see the possibilities, at least I think I can. That status board is also very powerful , combined with Pythonista, I think it's a winner -
Just downloaded Status Board and think it will work well for Ipad. I am running this script on my iphone which generates the gauges and I am pretty sure I can save them to dropbox. Will be working to create a Status Board which pulls these images into a status board on the ipad and could share it from there. Interesting Thanks again!
-
@mtrevino57 , gr4at. Really, I hope it adds some value, if not , not ventured , nothing gained.
But if it works out and you are able to post some images would love to see them. I realize some time due to company constraints not so easy to post stuff -
Panic is awesome. I love transmit for Mac, Coda for iOS, and Prompt for iOS. All great apps. I've heard good things about Firewatch, but I'm not much of a gamer.
I got Status Board a while back and decided it wasn't anything special. Let me know what you think, though.
-
@Phuket2@Webmaster4o, will do. Right now I am the only one using this particular script that generates these gauges, but there are times when it would be helpful to send alerts with graphics included. Will post followups here
-
@Webmaster4o , I think status board is fantastic. Well at least in concept. Well more than that. The only thing that throws me off is the html when making your own data providers. I sort of understand why they do it, but I am not use to it. But I see the potential of that tool. But it's a use case. If you have no need for it, it's just another widget. But it has many practical applications. Well infinite applications really. Even in your room/house on the Apple TV. RSS feeds, hue light status, time zones, etc... Again, it's a use case. What do you need, want.
-
@Phuket2 @mtrevino57 They may also have added a lot of functionality since I use it last. I think I remember that most features were a paid upgrade when I got it last? I didn't really think it was worth the money, and it didn't seem to do anything Pythonista couldn't with matplotlib