kopia lustrzana https://github.com/vilemduha/blendercam
Test string cleanup continues
rodzic
08832bd6d3
commit
1c66f16f5c
|
@ -23,6 +23,6 @@ def progress_async(text, n=None, value_type="%"):
|
||||||
Raises:
|
Raises:
|
||||||
Exception: If an exception is thrown during the operation.
|
Exception: If an exception is thrown during the operation.
|
||||||
"""
|
"""
|
||||||
throw_exception = yield ("Progress:", {"text": text, "n": n, "value_type": value_type})
|
throw_exception = yield (f"Progress:{text} {n}{value_type}\n")
|
||||||
if throw_exception is not None:
|
if throw_exception is not None:
|
||||||
raise throw_exception
|
raise throw_exception
|
||||||
|
|
|
@ -178,8 +178,8 @@ def progress(text, n=None):
|
||||||
if n is None:
|
if n is None:
|
||||||
n = ""
|
n = ""
|
||||||
else:
|
else:
|
||||||
n = " " + str(int(n * 1000) / 1000) + "%"
|
n = str(int(n * 1000) / 1000) + "%"
|
||||||
sys.stdout.write("progress{%s%s}\n" % (text, n))
|
sys.stdout.write(f"Progress: {text}{n}\n")
|
||||||
sys.stdout.flush()
|
sys.stdout.flush()
|
||||||
|
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue