File: uprogressMessage.py

package info (click to toggle)
far2l 2.7.0~beta%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 44,304 kB
  • sloc: cpp: 263,566; ansic: 53,886; python: 7,048; sh: 1,516; perl: 410; javascript: 279; xml: 145; makefile: 31
file content (21 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import time
import logging
from far2l.plugin import PluginBase
from far2l.farprogress import ProgressMessage

log = logging.getLogger(__name__)

class Plugin(PluginBase):
    label = "Python Progress Message"
    openFrom = ["PLUGINSMENU"]

    def OpenPlugin(self, OpenFrom):
        t = ProgressMessage(self, "Progress demo", "Please wait ... working", 100)
        t.show()
        time.sleep(2)
        for i in range(0, 100, 20):
            if t.aborted():
                break
            t.update(i)
            time.sleep(2)
        t.close()