Tkinter polling example: file copy with progress bar

JohnWShipman john at nmt.edu
Tue Dec 14 23:53:10 EST 2010


On Dec 14, 8:57 am, "D'Arcy J.M. Cain" <da... at druid.net> wrote:
> On Tue, 14 Dec 2010 07:35:45 -0800 (PST)
>
> baloan <balo... at googlemail.com> wrote:
> > Unfortunately you use command('cp...') to copy the file instead of
> > Pythons portable library methods. This choice
> > effectively makes your program work on Unix only (not Windows).
>
> > Seehttp://modcopy.sourceforge.netfor a more portable version.
>
> I guess I missed the beginning of this thread but can someone tell me
> why one needs to download a whole other program in order to do this?
>
>   open(out_fn, 'w').write(open(in_fn).read())

I posted this example because I got several queries on how to do
polling in Tkinter, specifically how to use the .after() universal
widget method.  The points about using the portable library methods
are all well taken.  I used file copy as the example long-running
process because a reader wanted to know how to do that specifically.
Please forgive me for not thinking about portability and stuff; you
know how us ancient Unix weenies are.



More information about the Python-list mailing list