Python 2 and 3 have slightly different stdin input functions, we should have shared code that centralizes these differences. In developing https://bugs.webkit.org/show_bug.cgi?id=225985, I found myself building a Yes/No command line input picker multiple times, that seems like something that should be shared as well.
<rdar://problem/78261645>
Created attachment 429178 [details] Patch
Created attachment 429362 [details] Patch
Created attachment 431344 [details] Patch
Created attachment 434461 [details] Patch
Created attachment 434873 [details] Patch
Comment on attachment 434461 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=434461&action=review r=me > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:32 > + def choose(cls, prompt, options=None, default=None, strict=False, numbered=False): Is this used any where other than unit tests?
(In reply to dewei_zhu from comment #7) > Comment on attachment 434461 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=434461&action=review > > r=me > > > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:32 > > + def choose(cls, prompt, options=None, default=None, strict=False, numbered=False): > > Is this used any where other than unit tests? Not yet, but https://bugs.webkit.org/show_bug.cgi?id=225985 uses it. Patch for that change is up, needs some clean up before review, though.
Comment on attachment 434461 [details] Patch Need to bump webkitcorepy version.
Created attachment 434911 [details] Patch for landing
Committed r280640 (240253@main): <https://commits.webkit.org/240253@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 434911 [details].