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.


    Pythonista empty start screen

    Pythonista
    4
    7
    3248
    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.
    • cvp
      cvp last edited by

      My scripts, when started via url scheme (pythonista://MyApps/Scriptname?action=run), always begin by a full screen ui.view hiding the App background and hiding the title bar, and are ended by buttons which return to the Apple home screen via webbrowser.open("launcher://crash"). So, the user would never see the Pythonista app, nor at begin, nor at end.
      Could it be possible that, when Pythonista starts by its url (ex: launched by any Launcher app or by an home screen icon), the App shows an empty start screen instead of its main menu?
      Thanks for your help.

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

        From the latest update:

        You can customize the startup process of the Python interpreter by creating a file named “pythonista_startup.py” in the site-packages folder. When the app is launched, the interpreter will execute this module, so that all variables/functions/classes in the script become available globally. A common use case might be from math import * (if you want to use the console as a calculator). Note: If Pythonista becomes unusable due to a misbehaving startup script, you can launch the app in a “clean” state by entering pythonista:// in Safari’s address field.

        You could use the editor module to load an empty file.

        I'm not confident that will work when you load a script via the URL scheme though...but you can try!

        Webmaster4o 1 Reply Last reply Reply Quote 0
        • Webmaster4o
          Webmaster4o @cook last edited by

          @cook pythonista_startup.py is not run when you launch the app from a URL scheme. It's only run if you launch the app manually. All this would accomplish would be loading an empty file every time you opened the app.

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

            I'm thinking about adding some optional arguments to the URL scheme to basically show an empty screen (or perhaps a colored background with an icon) when launching a script via URL scheme. I haven't really started implementing any of it though, and there are a couple of things with higher priority on my todo list right now.

            1 Reply Last reply Reply Quote 5
            • cvp
              cvp last edited by

              Tanks everybody for your answers.
              I think that, as OMZ said, there is no solution actually.
              Not very important because there is only 1 second between the launch via Url and the load of my ui.view and during this second max, the start screen of Pythonsta is displayed.

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

                @omz do you still plan to add this optional argument to the URL scheme?
                Anyway, one more time, thanks for your marvelous app!

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

                  See the hoped result

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