omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    Sliders in pythonista

    Pythonista
    sliders pytonista
    6
    14
    7407
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Holm
      Holm last edited by

      How do i change the values of a variable in pythonista using a slider

      cvp 1 Reply Last reply Reply Quote 0
      • cvp
        cvp @Holm last edited by cvp

        @Holm little example to change the value of the variable x

        import ui
        x = 0
        x_max = 100
        def s_action(sender):
        	x = x_max*sender.value
        	sender.name = 'x='+str(int(x))
        s = ui.Slider()
        s.action = s_action
        s.width = 200
        s.name = 'x='+str(int(x))
        s.present('sheet')
        
        1 Reply Last reply Reply Quote 0
        • struct_engr_
          struct_engr_ last edited by struct_engr_

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • struct_engineer
            struct_engineer last edited by

            http://khoitsmahq.firstcloudit.com/images%2Fslider screenshot.jpeg

            https://www.mathpax.com/whats-on-the-pythonista-menu-yep-sliders/

            I built an app and am running this app on my iPad.

            Credit to:

            • [toggle the sliders]
              • mikaelho / pythonista – gestures
            • [sliders with labels]
              • tdamdouni / Pythonista
              • Pythonista / slider / SliderWithLabel_danrcook.py

            The video shows an app with 8 inputs — 2 integer, 4 float, 2 boolean. Numeric input is tedious — at best; slider input is easier and offers positive feedback. In this app, both approaches are used:

            Efficient sliders for user input
            Only clear text for user screenshots

            I enhanced the slider class to allow min values, floats, rounded floats, booleans. Rounded floats allow only multiples of say 0.5 [0.0, 0.5, 1.0, 1.5 ... ] or of 5 [0, 5, 10, 15 ...].

            1 Reply Last reply Reply Quote 0
            • struct_engineer
              struct_engineer last edited by struct_engineer

              Here is the code gist:

              khoitsma/augmented_slider.py
              https://gist.github.com/khoitsma/3bd07918e41ad6384359432c1c9f199e

              1 Reply Last reply Reply Quote 0
              • struct_engineer
                struct_engineer last edited by

                I’ve completed my new app for iPhone and iPad.

                • AISC Bolt Shear Capacity based on AISC 15th Edition
                • (American Institute of Steel Construction)

                Thanks to all.

                aisc-bolt-shear-capacity-pythonista

                1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  It would be cool if you could make this a GitHub repo instead of a GitHub gist. That would allow others to suggest improvements in the form or pull requests. For instance:

                  self.s_type = kwargs['s_type'] if 's_type' in kwargs else 'int'
                  # could be rewritten as
                  self.s_type = kwargs.get('s_type', 'int')
                  

                  https://docs.python.org/3/library/stdtypes.html#dict.get

                  1 Reply Last reply Reply Quote 1
                  • struct_engineer
                    struct_engineer last edited by

                    Thanks -- done.

                    • augmented_slider.py
                    • overlay_test.py
                    1 Reply Last reply Reply Quote 0
                    • struct_engineer
                      struct_engineer last edited by

                      @ccc

                      Just wondering what is the status of Pythonista development ?

                      I've been around this forum for about 4 years -- I notice the app hasn't been updated since Feb 2020.

                      I'm guessing there will be no further development.

                      Thanks,
                      Karl
                      https://www.mathpax.com/

                      struct_engineer Niall 2 Replies Last reply Reply Quote 0
                      • ccc
                        ccc last edited by

                        https://pyto.app is the best upgrade path that I know of for Pythonista users.

                        cvp 1 Reply Last reply Reply Quote 0
                        • cvp
                          cvp @ccc last edited by

                          @ccc said

                          upgrade

                          That's true for Python's level, available external modules and some functionalities (background, remote notifications, ...) but is far away of what Pythonista provided already some years ago (calendar, contacts, appex mode, ....)
                          And, of course, app is continuously upgraded.

                          1 Reply Last reply Reply Quote 1
                          • struct_engineer
                            struct_engineer @struct_engineer last edited by struct_engineer

                            Here's a screenshot from the App Store:

                            App store shot
                            (I edited this image size and resolution)

                            I would pay a subscription price to get more frequent updates.

                            cvp 1 Reply Last reply Reply Quote 0
                            • cvp
                              cvp @struct_engineer last edited by

                              @struct_engineer said

                              I would pay a subscription price to get more frequent updates.

                              I agree and you aren't the first person who says that, but unhappily without reaction of @omz, the genius developer of our preferred app

                              1 Reply Last reply Reply Quote 0
                              • Niall
                                Niall @struct_engineer last edited by

                                @struct_engineer Ole's Twitter account has been silent for just over a year.

                                It's a shame Pythonista's falling by the wayside -- it's one of my favourite IDEs on any system for how clean, clear and focused it is.

                                I'd always hoped he'd follow up by repurposing the UI for website work.

                                I teach Python and I'd love to recommend Pythonista to my iPad-owning students, but as new Python features slowly work their way into the syllabus, I'm finding it harder to do so...

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Powered by NodeBB Forums | Contributors