added comments to explain 668c8ce6
This commit is contained in:
parent
668c8ce66e
commit
58c95e0a45
1 changed files with 4 additions and 0 deletions
4
main.py
4
main.py
|
@ -14,10 +14,14 @@ def print_bar():
|
||||||
print("%{c}", end="")
|
print("%{c}", end="")
|
||||||
case "right":
|
case "right":
|
||||||
print("%{r}", end="")
|
print("%{r}", end="")
|
||||||
|
# convert group to list so we can access subsequent items
|
||||||
group = list(running_modules_dict[alignment].items())
|
group = list(running_modules_dict[alignment].items())
|
||||||
for index, module in enumerate(group):
|
for index, module in enumerate(group):
|
||||||
print(module[1], end="")
|
print(module[1], end="")
|
||||||
|
# IF module is not the last AND it has text
|
||||||
if index != (len(group) - 1) and len(module[1]) > 0:
|
if index != (len(group) - 1) and len(module[1]) > 0:
|
||||||
|
# THEN only print seperator if the module is eventually followed
|
||||||
|
# by a module with text
|
||||||
for i in range(index + 1, len(group) - 1):
|
for i in range(index + 1, len(group) - 1):
|
||||||
if len(group[i][1]) > 0:
|
if len(group[i][1]) > 0:
|
||||||
print(seperator, end="")
|
print(seperator, end="")
|
||||||
|
|
Loading…
Reference in a new issue