DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Python (http://www.daniweb.com/forums/forum114.html)
-   -   Help undestanding popen3 function (http://www.daniweb.com/forums/thread70542.html)

alba07 Feb 20th, 2007 7:22 pm
Help undestanding popen3 function
 
I am supposed to design a GUI for ls, where the user could select these options from pull down menus. After the user selects options, clicking on go should run the ls.

The way I am understanding this is that could either use a text widget or labels.

Here is the problem, I have no idea what the popen3 function does.

Any help is greatly appriciated.

bumsfeld Feb 21st, 2007 12:52 pm
Re: Help undestanding popen3 function
 
This uses popen4(), but I think its similar:
# run an external program (cmd) and retrieve its output:
import os
cmd = "ls"
fin, fout = os.popen4(cmd)
result = fout.read()
print result

alba07 Feb 22nd, 2007 9:09 pm
Re: Help undestanding popen3 function
 
I am not sure If to sure the popen 4. I am supposed to popen 3.

I guess the hardest part if that I am supposed to make a menu that allows the user to select option for ls such as ls -R, etc, from a drop-down menu.

I am confused I guess the most about which part to do first the menu or use the popen3 function?

I know that the menu button could be radiobuttons and be created in Tkinter, do buttons first then?

Thanks. I am kinda lost in this assingment.


All times are GMT -4. The time now is 12:46 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC