This is my opening a new question after having one of my questions marked as a duplicate (Unicode characters in the Python CLI). If you came from my previous question, after reading everything at this link: Python, Unicode, and the Windows console :my question is still unanswered. I don't need a command line script, I think. The chosen answer at that link isn't suited for my problem, nor did I find anything pertaining to my problem in the other answers. The other answers contained information I would find useful if I were trying to enable unicode characters on the command line on my own computer.
I am trying to learn as much about coding as I possibly can. So I wrote a few small programs, and wanted to allow my mother to use them on her computer, which does not have Python, of course. So in order to do that, I have been using the cx_Freeze
module to make it to where these little programs of mine will work on her computer, with her having nothing to do but extract a .rar and move the shortcut to her desktop.
This is what the programs look like when the .exe's are run.
This is the loop I am using containing the instructions for what to do if help is asked for.
valid_help_string_list = ['\'help\'',
'\'HELP\'',
'help',
'HELP',
'"help"',
'"HELP"']
while True:
weight_entry = input('Please enter your weight or type \'help\' for the pictogram legend.\nPlease round decimal numbers to the nearest tenth: ')
if weight_entry in valid_help_string_list:
print('\nLegend:\n□ = 10 lbs\n▪ = 5 lbs\n▫ = 1 lb\n∙ = .1 lbs\n')
else:
weight_entry = validate_entry(weight_entry)
if weight_entry:
break
This is what it should look like when anything in the help list is input.
This is what I am getting. Whenever anything in valid_help_string_list
is typed, the program crashes because of the unicode characters.
Is there any actual Python code that can handle something like this? I want to be able to make this happen on other people's computers locally during runtime (the change to the encoding of the command line, if that's what needs to happen).