Skip to content

Commit

Permalink
Improve Python menu spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
solidpixel committed Jan 12, 2025
1 parent d871b40 commit 64ebcaf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lglpy/ui/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def select_from_menu(title: str, options: list[str]) -> Optional[int]:
while True:
try:
# Print the menu
print(f'\nSelect a {title}')
print(f'Select a {title}')
chars = int(math.log10(len(options))) + 1
for i, entry in enumerate(options):
print(f' {i+1:{chars}}) {entry}')
Expand All @@ -83,7 +83,7 @@ def select_from_menu(title: str, options: list[str]) -> Optional[int]:
raise ValueError()

except ValueError:
print(f'\n Please enter a value between 0 and {len(options)}')
print(f'\n Enter a value between 0 and {len(options)}\n')

print('\n')
print('')
return selection

0 comments on commit 64ebcaf

Please sign in to comment.