Tkinter question - proper output in Text widget

T

T. Kaufmann

Hi there,

I have some lines of code in a Tkinter programm - I want to list every single
file of a zip-archive in a Text widget:

fp = os.popen("%s %s" % ('unzip -vl ', 'anyarchiv.zip', 'r')
for line in fp:
textWidget.insert(END, "%s" % (line))

The result is that the columns are not really proper if the file-size of the
listed files is different. An output example:


Length Method Size Ratio Date Time CRC-32 Name
-------- ------ ------- ----- ---- ---- ------ ----
1175 Defl:N 513 56% 05-23-03 13:51 084e4103 charset.py
972 Defl:N 427 56% 04-05-03 18:42 b8bb850d controller.py


Here it looks good but not in my application (in the Text widget). Whats wrong?
How can I made a better result (proper columns).

o-o

Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top