-
-
Couldn't load subscription status.
- Fork 229
Open
Labels
only on windowsHappens on Windows OS onlyHappens on Windows OS only
Description
from pathlib import Path
from time import sleep
from alive_progress import alive_it, config_handler
config_handler.set_global(length=50, theme="classic", dual_line=True)
files = list(Path.cwd().glob("*"))
bar = alive_it(files, title="TEST")
print("this text will get deleted")
for file in bar:
file_type = "Folder" if file.is_dir() else "File"
bar.text(f"{file_type}: {file.name}")
sleep(1)If I remove bar.text(f"{file_type}: {file.name}"), then it works as expected:
If I remove file_type = "Folder" if file.is_dir() else "File", again it works:
From what I can gather, evaluating anything in file_type from the above example causes this. Getting rid of either this or bar.text fixes it at the cost of well not being able to do what I want. Same happens if I use any arbitrary function like:
from pathlib import Path
from time import sleep
from alive_progress import alive_it, config_handler
config_handler.set_global(length=50, theme="classic", dual_line=True)
def check(file: Path) -> int:
if file.is_dir():
return 1
else:
return 0
files = list(Path.cwd().glob("*"))
bar = alive_it(files, title="TEST")
print("this text will get deleted")
for file in bar:
file_type = "Folder" if check(file) == 1 else "File"
bar.text = f"{file_type}: {file.name}"
sleep(1)Metadata
Metadata
Assignees
Labels
only on windowsHappens on Windows OS onlyHappens on Windows OS only


