The part about startup files in my last message is probably wrong. If one starts IDLE by 'import idlelib.idle' after setting 'sys.ps1 = 'me ', then the setting is recognized. However, a startup file that runs in the user process will not affect sys.ps1 in the IDLE process. We could add a command line option -p "prompt", but I don't see this as sufficiently important.
At least some shells and consoles recognize special characters in a prompt string to create the prompt. For instance, the default setting on Windows is "$P$G", which I presume stands for 'working directory path' and 'greater than symbol', with a result such as "F:/dev/3x>". (I have no idea where this is documented.) Python and IDLE will print the literal string instead. Custom prompts therefore seem like an advanced feature, not one aimed at beginners. |