gpython: Reorganize options parsing
Reorganize parsiong of command line options so that first all options are parsed in a loop, and only after that a module/file/command is executed. This is needed as preparatory step for next patch: there we'll add support for -W, and `-W arg` can be given multiple times and has to be processed multiple times by creating multiple corresponding warning filters. Because those warning filters has to be applied uniformly to all 4 codepaths of execution phase (-m/-c/file/interactive console), it makes sense to move execution phase to after options parsing and inject common runtime preparatory steps right before that. This logic generally applies not only to -W, but to all other python options - e.g. -Q,-u,...
Showing
Please register or sign in to comment