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.


    [BugReport] console.input_alert always sends KeyboardInterrupt when hide_cancel_button is True

    Pythonista
    1
    1
    1035
    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.
    • pointer_midel
      pointer_midel last edited by

      console.input_alert(title[, message, input, ok_button_title, hide_cancel_button=False])

      Show a dialog with a single text field. The text field can be pre-filled with the input parameter. The text that was entered by the user is returned. The ‘Cancel’ button sends a KeyboardInterrupt.

      I've been writing a script that makes use of some user input_alerts and login_alerts from the console library. The script is designed to allow users to get a listing of a SFTP folder and download a "list" of files from the server to a folder within Pythonista. The selector makes use of a number input into a input_alert. Wanting to avoid the script termination to a KeyboardInterrupt

      I hid the Cancel button only to discover that it always causes a KeyboardInterrupt. For an example I am providing the Gist to the script since it is mostly complete and I planned on sharing it upon completion anyway.

      Gist Link

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