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.

Recommended Answers

All 2 Replies

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.