omz:software Forums

Pythonista

If you want to participate in the discussion, you have to sign up or log in.

Categories: General, Share Code, Questions RSS (All Posts)

All Discussions

Is there a way to access the FaceTime iPad camera through code?

I'm using the following to take a photo on an iPad: myimage = photos.capture_image() But that always accesses the iSight camera (the one on the back of the iPad). For the purposes of my program I'd like to access the other camera every time. I realize ...

Started by nasadave (in Questions) — 1 reply 3 hours ago


Reading EXIF data from photo

Hi, I plan to write a simple app that puts a datetime stamp to a photo based on its EXIF data. So far I haven't found a way to read the EXIF data, especially using Pythonista. Can anybody give me a light on this? Thank you. -Bee

Started by bee (in General) — 4 replies, latest 4 hours ago


Formatting Pythonista code before posting it to GitHub

I have found the following best practice tips useful for formatting Pythonista code before posting it to GitHub: One Time Setup: When looking at the list of files at the left of the Pythonisa screen, click the gear icon at the bottom left of the screen....

Started by ccc (in General) — 7 replies, latest 7 hours ago


Frame for Navigation Buttons

Default frame for left button items? Also, since I'm creating a ui.Button object and placing it in that spot... In a navigation view how can I tell if I'm back at the home view? For example, I hide the button when I move into a new table (tableviewdidsel...

Started by Dann (in Questions)


ui.CheckBox?

Is there an easy way to implement a ui checkbox control? I didn't find one on the ui doc class list. I was surprised.

Started by zencuke (in Questions) — 4 replies, latest 18 hours ago


Always checking text field

Is there any way to make a function or something that will be running all the time? I want to always be checking if a text field is empty.

Started by techteej (in Questions) — 8 replies, latest 21 hours ago


General bug report thread

Changing the name of any folder will always move it into the root Script Library folder, even if it was previously located elsewhere. Fortunately this does not cause data loss, all files will still be in the folder after this happens, so you can move the f...

Started by dgelessus (in General) — 13 replies, latest 1 day ago


Blending ui.Image doesn't work

Hi all, trying to blend two images using UI module using the code below. But it seems that the blend mode is ignored and one image just being drawn on top of the other. It works if I draw e.g. a rect on top of the first image but not with two images. Any s...

Started by uncleWalter (in Questions)


Script disappeared

I wonder whether anyone has experienced the same -very annoying- behaviour: All of a sudden the complete contents of one of my scripts has disappeared. What's left is an empty script. This happened to me already three times! I can't reproduce it. Maybe a ...

Started by upwart (in General) — 8 replies, latest 1 day ago


Getting the row title of the selected row

Not sure why I'm getting errors here, but I'm trying to get the title of the selected row chosen (or the name of whatever is in the row) if sender.items[title] == 'Notepad': ui.load_view('Notepad').present() else: pass

Started by techteej (in General) — 16 replies, latest 1 day ago


chordcalc - a stringed instrument chord calculator

chordcalc is a gui-based version of Gek S. Low's chordcalc 0.3. Too many features to describe. See the readme on the github repository. Includes makeWaves.py, a program to create 96 2-sec sound files that allow the script to play the sounds of the frett...

Started by polymerchm (in Share Code) — 1 reply 3 days ago


Help with using ui.View methods?

What I am trying to do is create a ui with a single button. Upon the first button press a timer starts, which after 5 seconds closes the view. I want to measure the number of times the user can tap the button in 5 seconds. I display my ui (which I made in ...

Started by Brian (in Questions) — 3 replies, latest 3 days ago


Text Field splits up word when entering into Table View

For some reason, entering text into a Text Field then adding to a table splits up the word into one cell for each letter. # coding: utf-8 import ui class Data (ui.ListDataSource): def __init__(self, items=None): ui.ListDataSource.__init__(se...

Started by techteej (in Questions) — 5 replies, latest 3 days ago


Help with text field delegate

I'm not sure how to integrate the text field delegate into my source code. Here is what I have so far. # coding: utf-8 from os import listdir, getcwd from editor import open_file from console import hud_alert import ui # search + opening files do not wor...

Started by techteej (in General) — 3 replies, latest 3 days ago


Cropping an image in Cards.py

I want to crop the images used in the Cards.py example. But I can't figure out how. Do I do it in the line card.card_image = images[i] or the line card.image = card.card_image and if so then how? I've tried everything I can think of: Image.crop, Imag...

Started by inoddy (in Questions) — 2 replies, latest 3 days ago


Calculator - predefined number

Is there anyone who could help me modify the original calculator example so that you can pass an argument to it from url to predefine the first number for an equation?

Started by BryanPatrick (in Questions) — 2 replies, latest 5 days ago


Broken Logic?

Not quite sure If I'm doing this right, as when I call the function, nothing gets printed. def search_files(): dir_items = listdir(getcwd()) query = v['searchbox'].text if query in dir_items: print 'IT WORKED' else: print '...

Started by techteej (in Questions) — 1 reply 5 days ago


Problem with text rendering in scene

I am having these weird problems with text rendering using scene. It gives me a black rectangle instead of text, but if I switch to another app and switch back to Pythonista, it shows text instead of rects. Any ideas how to fix it? GitRepo with files: ht...

Started by ShadowSlayer (in General)


Can textview show a str and var together?

from ui import * import ui x = 5 def paper(sender): label = sender.superview['textview1'] label.text = 'ggg',x ui.load_view('script').present('sheet') Typeerror: Expected a string P.S. sory for my English

Started by apselon (in General) — 2 replies, latest 6 days ago


Documents

Here is my Documents class project, It persists rich text documents with inserted images to '.mme' files, either embedded in the .py file (if you like the one file model) or a separate text file such as '.mme' or '.txt' (if you like multiple files), or to ...

Started by tony (in Share Code) — 1 reply 6 days ago