• brumm

    setup() is only called once. You might like to call a function/method for changed values. Search for Slider Attributes => Slider.action

    not tested:

    def setup(self):
            slider = self.view.superview['slider1']
            slider.action = self.slider_changed
    
    def slider_changed(self, sender):
            print(sender.value)
    

    posted in Pythonista read more
  • brumm

    First letter a small ā€žiā€œ and the second letter is any other small letter. In my example = ['is', 'is', 'ia', 'in']

    posted in Pythonista read more
  • brumm

    Settings > Discord > Open Pyto

    posted in Pythonista read more
  • brumm

    class User_Input_Date():
        def __init__(self):
    
            self.month_input = input('What was the month (1-12)')
            if self.month_input in ['01', '1', 'Jan', 'January', 'jan', 'january']:
                self.month_input = 1
            elif self.month_input in ['02', '2', 'Feb', 'February', 'feb', 'february']:
                self.month_input = 2
            elif self.month_input in ['03', '3', 'Mar', 'March', 'mar', 'march']:
                self.month_input = 3
            else:
                self.month_input = None
            self.year_input = int(input('What was the year?'))
            
        def printDate(self):
            print(f'year = {self.year_input} month = {self.month_input}')
            
    primary_bariatric_date = User_Input_Date()
    primary_bariatric_date.printDate()
    

    You store the variables with self.name instead returning it.

    posted in Pythonista read more
  • brumm

    
    button1.frame = (x, y,width,height)
    button2.frame = (x, y,width,height)
    
    v.add_subview(button1)
    v.add_subview(button2)
    

    posted in Pythonista read more
  • brumm

        def draw(self):
            self.iv.image.draw(0,0,self.width,self.height)
    

    you can only fit your image or you might like to calculate the screen ratio first...

    posted in Pythonista read more
  • brumm

    with Pythonista 3.2 +

    #...
            self.iv.image = ui.Image.named('lock_screen.png')
    
        def draw(self):
          self.iv.image.draw()
    #...
    

    it worked for me

    edit: btw. leave out the ImageView is also possible

    #...
            #self.iv = ImageView()
            #self.iv...
            self.image = ui.Image.named('lock_screen.png')
    
        def draw(self):
          self.image.draw()
    #...
    

    posted in Pythonista read more
  • brumm

    I don't use pytube, but youtube-dl is working pretty well for me.

    posted in Pythonista read more
  • brumm

    You only set the action function of your first button (4 times).

    b_top1.action = button_tapped
    

    In this function you need to test the self.title (SUM, DIV, ...) if you want to use it for all four operations.

    posted in Pythonista read more

Internal error.

Oops! Looks like something went wrong!