Progress Box or Bar in Windows

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tubby

    #1

    Progress Box or Bar in Windows

    Hi guys,

    I have a Python script that I've prettied-up for Windows users by adding
    things like shell.SHBrowseF orFolder and win32gui.Messag eBox, etc. In
    short, it looks like this:

    1. Pretty window where user can browse for folder. (instead of typing
    path into cmd prompt)

    2. win32gui.Messag eBox informing user the script will now begin.

    3.

    4. win32gui.Messag eBox informing user the script has finished.

    I left 3 blank. This is where I'd like to use some sort of progress
    indicator (a box that says 'processing 3 of 30 files... 4 of 30, etc' or
    a progress bar that moves across the screen as the script does its job.
    Any ideas on how to do this quickly and easily (less than 20 lines of code)?

    I'd prefer to stick with the win32 extensions, but I'd be willing to use
    TK too if that would be simpler... and it looks like TK would be much
    simpler :)

    Thanks!

  • dkinakin@gmail.com

    #2
    Re: Progress Box or Bar in Windows

    Not that I want to suggest a completely different solution; however, I
    have used:



    to add simple file open dialogs, message boxes, and progress bars to
    many of my scripts.

    You may want to have a look at it. It's easy to install and really
    simple to use.

    tubby wrote:
    Hi guys,
    >
    I have a Python script that I've prettied-up for Windows users by adding
    things like shell.SHBrowseF orFolder and win32gui.Messag eBox, etc. In
    short, it looks like this:
    >
    1. Pretty window where user can browse for folder. (instead of typing
    path into cmd prompt)
    >
    2. win32gui.Messag eBox informing user the script will now begin.
    >
    3.
    >
    4. win32gui.Messag eBox informing user the script has finished.
    >
    I left 3 blank. This is where I'd like to use some sort of progress
    indicator (a box that says 'processing 3 of 30 files... 4 of 30, etc' or
    a progress bar that moves across the screen as the script does its job.
    Any ideas on how to do this quickly and easily (less than 20 lines of code)?
    >
    I'd prefer to stick with the win32 extensions, but I'd be willing to use
    TK too if that would be simpler... and it looks like TK would be much
    simpler :)
    >
    Thanks!

    Comment

    • cyberco

      #3
      Re: Progress Box or Bar in Windows

      Go for wxPython, it'll fulfill all your GUI needs. Handsdown the best
      GUI toolkit I ever ran into. It can't get much simpler than:

      wx.MessageBox(' hi')

      And there are tons of readymade dialogs and progressbars in the
      library. Check out the demo.py under the wxPython installation dir to
      see demos (and source) of the enormous list of controls.

      Comment

      • tubby

        #4
        Re: Progress Box or Bar in Windows

        cyberco wrote:
        Go for wxPython, it'll fulfill all your GUI needs. Handsdown the best
        GUI toolkit I ever ran into.
        Thanks a lot! I had no idea wxPython was so easy to use. I added a
        progress bar from wx to the app. Less than 20 lines of code and it only
        took about 5 minutes!

        Comment

        Working...