Tkinter question - proper output in Text widget

Discussion in 'Python' started by T. Kaufmann, Jul 9, 2003.

  1. T. Kaufmann

    T. Kaufmann Guest

    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
    T. Kaufmann, Jul 9, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Walzer
    Replies:
    1
    Views:
    457
    John McMonagle
    Dec 11, 2006
  2. dmitrey
    Replies:
    0
    Views:
    1,081
    dmitrey
    Oct 14, 2008
  3. Frederic Rentsch
    Replies:
    0
    Views:
    238
    Frederic Rentsch
    Jul 8, 2012
  4. Terry Reedy
    Replies:
    15
    Views:
    632
    Frederic Rentsch
    Jul 16, 2012
  5. Frederic Rentsch
    Replies:
    0
    Views:
    426
    Frederic Rentsch
    Jul 9, 2012
Loading...

Share This Page