Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Tkinter question - proper output in Text widget

Reply
Thread Tools

Tkinter question - proper output in Text widget

 
 
T. Kaufmann
Guest
Posts: n/a
 
      07-09-2003
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Tkinter.event.widget: handler gets name instead of widget. Terry Reedy Python 15 07-16-2012 10:32 AM
Re: Tkinter.event.widget: handler gets name instead of widget. Frederic Rentsch Python 0 07-09-2012 08:39 PM
Tkinter.event.widget: handler gets name instead of widget. Frederic Rentsch Python 0 07-08-2012 09:19 PM
Tkinter question: howto redirect text output (stdout) to Text widget? dmitrey Python 0 10-14-2008 06:36 PM
No output from popen in Tkinter text widget Kevin Walzer Python 1 12-11-2006 11:17 PM



Advertisments