Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

PyGTK advice and returning data

  • 02-04-2009 9:02am
    #1
    Closed Accounts Posts: 34


    Hi Guys,

    I'm writing a pygtk program. At the minute it has one button and when you click the button the program executes

    os.system("/home/jack/somscript.sh")

    Lets say all I had in that script was an "ls" command, how do I get the list of directories back into my program.

    Also I'm wondering whats the best GUI designer for this stuff there appears to be a few choices ? I'm using Ubuntu by the way.

    Thanks for any help on this in advance.
    Regards,
    Jack


Comments

  • Registered Users, Registered Users 2 Posts: 85 ✭✭slavigo


    Hey,
    If you have a look at
    os.popen instead of os.system
    a = os.popen('/home/jack/somscript.sh')
    print a.read()
    

    Hope it's what your looking for.
    Dave.


  • Closed Accounts Posts: 34 jackofnotrades


    that looks like good stuff I'm gona try it out thanks


Advertisement