Well I can change my code and add an Exit button or something, I'll figure out some way to work around this.
Thanks for all your help.
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.
Well I can change my code and add an Exit button or something, I'll figure out some way to work around this.
Thanks for all your help.
I have @ui.in.background before the line that takes the picture with the built-in camera. So that code looks like this:
@ui.in.background
def button_camera(sender):
if len(pics) == 4:
pics.pop(0)
pic = photos.capture_image()
if pic:
pics[len(pics):] = [pic]
showpics(sender)
So in my ui, I have a button with an action set to button_camera.
Huh, that also blocks the camera.
I added a wait_model() line after the present() line, but it seems to block access to the camera.
Any tips there?
I'm sure I'm missing something obvious.
I added os.exit(EX_OK) after the v.present() line in my code, and when I run my app, Pythonista exists right away.
My code:
v = ui.load_view('umswi')
v.present()
os._exit(EX_OK)
If I remove the os._exit(EX_OK), my app runs until I press the "X" in the upper left-hand corner. If I put the os._exit(EX_OK) back in, my app starts and immediately exits.
If a user presses "X" in the upper left-hand corner, I want Pythonista to close. But I don't want it to close until someone presses that "X".
What am I doing wrong?
That is good, it is brilliant, thank you!
I have my Phythonista app now. It is a simple app that allows a user to enter a ticket #, a brief message, and take up to four pictures. Once they click "SEND," it is all E-Mailed to an address. This is for a loading dock, so they can take pics of damaged loads.
So a couple of questions: (1) can I prevent users from accidentally changing the app? I don't care if they can see the source, just don't want them accidentally making changes to the point where it doesn't work.
(2) I've backed-up my .py file via E-Mail, is there a way to backup the .pyui file as well?
(3) I added an icon to the home screen but noticed that if I hit the Home button and tap the icon a dozen times, then go into Pythonista, I have a dozen instances of the app running. I can keep pressing X in the upper left-hand corner. Any way to prevent this?
Sorry for all the newbie question. I downloaded the Pythonista app on Friday and had my application running this evening. Very nice development system.
My UI has some imageview images that I successfully set.
But I'd like to know, how to clear them?
So if I do:
imageview1.image = picture
How do I underset imageview.1image back to blank/white?