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

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) — 4 replies, latest 1 hour 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 13 hours 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 14 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) — 6 replies, latest 15 hours 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 1 day 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 1 day 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 2 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 2 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 2 days ago


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)


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 4 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 4 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 5 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 5 days 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) — 12 replies, latest 5 days ago


Console.input_alert freeze

I have a webview that calls console.input_alert in the webview_did_finish_load function. I ensure that this is called on a background thread using the @ui.in_background decorator. I am experiencing freezes when the alert is displayed where I c...

Started by DigiDan (in General) — 1 reply 5 days ago


CaptureMedia (Apple confirmed: file upload bug)

@techteej Here [were] simplified start function and new request handler to use with CaptureMedia:

Started by tony (in General) — 9 replies, latest 5 days ago


Webview load_html issue

When using ui.webview.load_html() to use an HTML string the subsequent web page loaded has problems loading any relative links. All of these links have the protocol applewebdata://. From my research it seems that the equivalent objective c uiwebview functi...

Started by DigiDan (in General) — 1 reply 5 days ago