Massages ``argv`` into a useful list of strings. **If None** (the default), uses `sys.argv`. **If a non-string iterable**, uses that in place of `sys.argv`. **If a string**, performs a `str.split` and then executes with the result. (This is mostly a conven
(self, argv: Optional[List[str]])
| 583 | executor.execute(*self.tasks) |
| 584 | |
| 585 | def normalize_argv(self, argv: Optional[List[str]]) -> None: |
| 586 | """ |
| 587 | Massages ``argv`` into a useful list of strings. |
| 588 | |
| 589 | **If None** (the default), uses `sys.argv`. |
| 590 | |
| 591 | **If a non-string iterable**, uses that in place of `sys.argv`. |
| 592 | |
| 593 | **If a string**, performs a `str.split` and then executes with the |
| 594 | result. (This is mostly a convenience; when in doubt, use a list.) |
| 595 | |
| 596 | Sets ``self.argv`` to the result. |
| 597 | |
| 598 | .. versionadded:: 1.0 |
| 599 | """ |
| 600 | if argv is None: |
| 601 | argv = sys.argv |
| 602 | debug("argv was None; using sys.argv: {!r}".format(argv)) |
| 603 | elif isinstance(argv, str): |
| 604 | argv = argv.split() |
| 605 | debug("argv was string-like; splitting: {!r}".format(argv)) |
| 606 | self.argv = argv |
| 607 | |
| 608 | @property |
| 609 | def name(self) -> str: |