[python-win32] Simple Windows progressbar dialog (like messagebox) via Win32 API?

Tim Roberts timr at probo.com
Thu Sep 30 20:20:48 CEST 2010


 python at bdurham.com wrote:
> I know there is a simple interface to the Windows messagebox interface.
>  
> Is there an equivalent type of simple dialog box for showing a
> progressbar or progressbar-like information?
>  
> Use case: I have a collection of Python command line utilties that can
> take up to several minutes to run. These are utilities may be called
> from other applications. Our users have asked whether these utilities
> can display a progressbar while they are running.
>  
> Our utilities are very lean right now and easy to distribute and
> support. We would like to avoid having to use Tkinter or large GUI
> frameworks like wxPython and pyQt if at all possible.

There are no progress dialogs built-in to Windows.

If you look in site-packages\pythonwin\pywin\Demos, you'll find
"progressbar.py".  This is a Python wrapper around the MFC CProgressCtrl
class.  You might be able to adapt that to do what you need, although
I'm not sure MFC is any lighter weight than Tkinter.

There is a collection of useful dialogs for non-gui programs called
"easygui.py".  Although it doesn't have a progress bar, perhaps their
philosophy might help you.  It uses Tkinter.

-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the python-win32 mailing list