Help undestanding popen3 function

Reply

Join Date: Feb 2007
Posts: 19
Reputation: alba07 is an unknown quantity at this point 
Solved Threads: 0
alba07 alba07 is offline Offline
Newbie Poster

Help undestanding popen3 function

 
0
  #1
Feb 20th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 1,221
Reputation: bumsfeld will become famous soon enough bumsfeld will become famous soon enough 
Solved Threads: 137
bumsfeld's Avatar
bumsfeld bumsfeld is offline Offline
Nearly a Posting Virtuoso

Re: Help undestanding popen3 function

 
0
  #2
Feb 21st, 2007
This uses popen4(), but I think its similar:
  1. # run an external program (cmd) and retrieve its output:
  2. import os
  3. cmd = "ls"
  4. fin, fout = os.popen4(cmd)
  5. result = fout.read()
  6. print result
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 19
Reputation: alba07 is an unknown quantity at this point 
Solved Threads: 0
alba07 alba07 is offline Offline
Newbie Poster

Re: Help undestanding popen3 function

 
0
  #3
Feb 22nd, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC