is the alphabet quick index exposed in pythonista. I'm loathe to make 26 cute little buttons, but will do so if necessary.
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.

Best posts made by polymerchm
-
Alphabet index for TableView
-
RE: HELP! How do I submit apps to the App Store from inside Pythonista?
There is someone (can't remember who) that used @OMZs xcode template to put one or two pythonista apps (with the full embedded python 2.7 interpreter and supported modules) up on the iTunes app store. That was with the current 1.5 version. OMZs comment was that until he can develop the 64-bit version as stable, it not a sustainable situation, because Apple won't allow 32-bit apps moving forward.
@OMZ, if your not too busy getting 1.6 back on line (hint, hint), you can confirm these thoughts.
-
RE: HELP! How do I submit apps to the App Store from inside Pythonista?
Having built and distrubuted via github, a highly complex gui based music application in pythonista that I would have paid $15ish for as a less capable standalone applicaiton, I'll take pythonista. At some later date, if I can make a buck off it, that would be a bonus, but not a requirement.
-
RE: Xcode Template for Pythonista
@omz Based on my experiments, am I correct in assuming that the template only has the 2.7 interpretor? Any hope the the 3.5/3.6 template will be forthcoming? I am learning swift just in case.
-
Pretty please CoreMidi for 1.6
Developing musical applications in pythonista. Want to play more notes that just the 2 piano octaves without having to have a "note" waveform library.
-
Simple demo of tableview logic for the novices
# coding: utf-8 # and example of tableview and how to control/use them import ui,console def listShuffle(list,row_from, row_to): ''' a method to re-order a list ''' from_item = list[row_from] del list[row_from] list.insert(row_to,from_item) return list class tvDelegate(object): #also acts as the data_source. Can be separate, but this is easier. def __init__(self,items): self.items = items self.currentNumLines = len(items) self.currentTitle = None self.currentRow = None def tableview_did_select(self, tableview, section, row): # Called when a row was selected. try: self.items[self.currentRow]['accessory_type'] = 'none' # un-flags current selected row except TypeError: #needed for very first selection pass self.items[row]['accessory_type'] = 'checkmark' self.currentTitle = self.items[row]['title'] self.currentRow = row # needed for the test above tableview.reload_data() # forces changes into the displayed list def tableview_did_deselect(self, tableview, section, row): # Called when a row was de-selected (in multiple selection mode). pass def tableview_title_for_delete_button(self, tableview, section, row): # Return the title for the 'swipe-to-***' button. return 'Delete' # or 'bye bye' or 'begone!!!' def tableview_number_of_sections(self, tableview): # Return the number of sections (defaults to 1). Someone else can mess with # sections and section logic return 1 def tableview_number_of_rows(self, tableview, section): # Return the number of rows in the section return self.currentNumLines #needed to be in sync with displayed version, def tableview_cell_for_row(self, tableview, section, row): # Create and return a cell for the given section/row cell = ui.TableViewCell() cell.text_label.text = self.items[row]['title'] cell.accessory_type = self.items[row]['accessory_type'] # or you could comment out the line above and use # #if self.items[row]['accessory_type'] == 'checkmark': # cell.text_label.font = ('<system-bold>',20) # or # cell.text_label.text_color = '#FF0000' # # for emphasis instead # return cell def tableview_can_delete(self, tableview, section, row): # Return True if the user should be able to delete the given row. return True # you can use logic to lock out specific ("pinned" entries) def tableview_can_move(self, tableview, section, row): # Return True if a reordering control should be shown for the given row (in editing mode). return True # see above def tableview_delete(self, tableview, section, row): # Called when the user confirms deletion of the given row. self.currentNumLines -=1 # see above regarding hte "syncing" tableview.delete_rows((row,)) # this animates the deletion could also 'tableview.reload_data()' del self.items[row] def tableview_move_row(self, tableview, from_section, from_row, to_section, to_row): # Called when the user moves a row with the reordering control (in editing mode). self.items = listShuffle(self.items,from_row,to_row) # cynchronizes what is displayed with the underlying list def onEdit(sender): global tv tv.editing = True def onDone(sender): global tv tv.editing = False # to avoid consufion in the selection logic, I clear all accessory type after an edit. for row in range(len(tv.data_source.items)): tv.data_source.items[row]['accessory_type'] = 'none' tv.reload_data() titles = "one two three four five six seven eight".split() itemlist = [{'title': x, 'accessory_type':'none'} for x in titles] vdel = tvDelegate(items=itemlist) #the pyui file consists of a tableview named tv_1 #and two buttons named button1 and button2 with labels 'edit' and 'done' respectively v = ui.load_view() tv = v['tv_1'] v['button1'].action = onEdit v['button2'].action = onDone tv.delegate = tv.data_source = vdel v.present('sheet')
Latest posts made by polymerchm
-
Beta expired
@omz Pythonista 3 beta has expired. When do we anticipate an update?
-
RE: App was accepted in iTunes store
@tlinnet @omz Did your app use any Python 3.5 dependent code? I need 3.5 as the default interpretor? Even with #!python3 on first line,
print (version)
says its 2.7 when run in the xcode ios simulator. -
RE: Xcode Template for Pythonista
@omz Based on my experiments, am I correct in assuming that the template only has the 2.7 interpretor? Any hope the the 3.5/3.6 template will be forthcoming? I am learning swift just in case.
-
RE: Xcode Template for Pythonista
Trying to run my app via xcode and the current template. How do you force it to run the Python 3 interpretor?
-
RE: Xcode Template for Pythonista
Not that I have tried it, but you might try it as an objective-c project since I believe that's how OMZ wrote pytonista.
-
RE: Sound and ui modules not playing well together
@omz Worked as advertised. I always forget that trick. @JonB: Will try that in other situations. I guess I need to pay careful attention to the autocomplete for other tidbits. Thanks.
-
RE: Sound and ui modules not playing well together
@JonB. YES!!!!! That's what I hoped was out there. WIll try it tomorrow when Im actually awake and functional!!! Where do you find these things?
-
RE: Sound and ui modules not playing well together
def playProgression(button): if os.path.exists('waves'): if not model._InstrumentOctave: return else: baseOctave = model._InstrumentOctave strings = model._InstrumentTuning for chordNumber in range(len(model._ProgFingerings)) # here is where I inserted code to trigger a redraw of a custom view. # the redraw happens when this loop finished thisFingering = model._ProgFingeringsPointers[chordNumber] cc = model._ProgFingerings[chordNumber][thisFingering] frets = cc[2] dead_notes = [item[3] == 'X' for item in cc[0]] tones = [] for fret,string,dead_note in zip(frets,strings,dead_notes): if dead_note: continue octave,tone = divmod(string + fret,12) tones.append((tone,octave+baseOctave)) for tone,octave in tones: sound.play_effect(getWaveName(tone,octave)) time.sleep(model.play_arpSpeed*0.25) time.sleep(3*model.play_arpSpeed) # rest between chords # the "chords" play just fine as well as the final sleeps between chords.
-
RE: Sound and ui modules not playing well together
Reading the IOS bibles, seems I need to have access to the
audioPlayeDidFinishPlaying:successfully:
method in the delegate. Any chance the delegate is a hidden "feature" of sound or one I can "hack" into?