Closed jah-mann closed 5 years ago
The fix will be in v0.6.0.
I am getting the same issue. According to the readthedocs.io, the exit_option_text
parameter to the __init__
should allow me to set the custom Exit menu item text. however, when I attempt to call it, I get a TypeError: __init__() got an unexpected keyword argument 'exit_option_text'
.
I am confused, was this parameter there, and then not updated, and then removed? I am utilizing ConsoleMenu with python3. Has this been brought to the python3 version yet?
I am getting the same issue. According to the readthedocs.io, the
exit_option_text
parameter to the__init__
should allow me to set the custom Exit menu item text. however, when I attempt to call it, I get aTypeError: __init__() got an unexpected keyword argument 'exit_option_text'
.I am confused, was this parameter there, and then not updated, and then removed? I am utilizing ConsoleMenu with python3. Has this been brought to the python3 version yet?
Yeah I'm having the same issue. The example code shows it can be done but it doesn't seem to be implemented yet. Looking forward for that fix.
This issue should be resolved in v0.6.0 release.
Hi there,
Thanks for this menu, I enjoy the simplicity. The following is an enhancement request which I have already implemented on my instance of your code:
I'd like to allow custom exit text on the main menu screen. Currently, it is hard coded to show "Exit" as the option, even if we set the Console Menu parameter show_exit_option=False, and then add an ExitItem to the console menu with text="alternative exit text".
I think this would be useful for situations where the console menu does not start up directly upon running a script, so more accurate exit text might be "return to [...]". Also, this could just be useful for anyone who has a different idea of what the exit prompt should look like.
Here is how I would propose you can do this, within console_menu.py > class ExitItem:
On the second to last line (which is line 435 in console_menu.py), add the if statement before deciding to use the default exit prompt text "Exit". This way if someone creates and enables an ExitItem with custom text, it will show that text.