Kaydet (Commit) 2c7a6dba authored tarafından Eray Özkural's avatar Eray Özkural

aptal bir confirm fonksiyonu ekle

üst fc864771
......@@ -27,6 +27,14 @@ class CLI:
sys.stdout.write(colorize(msg, 'red'))
sys.stdout.flush()
def confirm(self, msg):
while True:
s = raw_input(msg + colorize('(yes/no)', 'red'))
if s.starts_with('y') or s.starts_with('Y'):
return true
if s.starts_with('n') or s.starts_with('N'):
return false
class Progress:
def __init__(self, totalsize):
self.totalsize = totalsize
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment