Results 1 to 7 of 7

Thread: dealing with terminal prompts in gui programs that i am making

  1. #1
    Join Date
    Aug 2012
    Beans
    10

    Post dealing with terminal prompts in gui programs that i am making

    I am making an application that has a gui to do my system updates [mainly just for programming practice (I'm still a noob)] and i know that i can do gksudo to get a password prompt to come up in gui to solve the problem of running something in root privileges, but what do i do about the [Y/n] prompt?
    I'm using python 2.7.3
    and Tkinter for my gui.

    if this can be done purely in python (which i know it probably can but i mean in a simple way i could use, learn from, and implement later) i would like to find out how.
    also
    if it can be done through a terminal command similar to gksudo that too would be helpful.

    Thanks
    rhlegion

  2. #2
    Join Date
    Aug 2012
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dealing with terminal prompts in gui programs that i am making

    With apt-get terminal command there's the option "-y" which assumes yes to all queries...
    Hope this helps

  3. #3
    Join Date
    Aug 2012
    Beans
    10

    Smile Re: dealing with terminal prompts in gui programs that i am making

    Thank you very much that will do it!
    but i will leave this thread open a little longer just to see some other options, such as maybe how to completely do it in python.



    Thanks
    rhlegion

  4. #4
    Join Date
    Aug 2012
    Beans
    110
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: dealing with terminal prompts in gui programs that i am making

    Glad to have helped! Sorry, I don't know anything about Python, so hopefully someone who can do the Python equivalent of this will be give more info.
    Have fun programming

  5. #5
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!

    Re: dealing with terminal prompts in gui programs that i am making

    Thread moved to Programming Talk.

  6. #6
    Join Date
    Aug 2012
    Beans
    10

    Re: dealing with terminal prompts in gui programs that i am making

    well i guess that will do it for the ubuntu forums. I guess ill move over to the python documentation to figure out the rest.

  7. #7
    Join Date
    Apr 2012
    Beans
    7,256

    Re: dealing with terminal prompts in gui programs that i am making

    I'm not exactly clear what you want to do - maybe some kind of expect-like functionality? there appears to be a pexpect module for python

    http://pypi.python.org/pypi/pexpect-u

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •