(args)
| 31 | |
| 32 | |
| 33 | def _safe_args(args): |
| 34 | # type: (Sequence[str]) -> List[str] |
| 35 | if WINDOWS: |
| 36 | argv0 = args[0] |
| 37 | pex_info = _maybe_load_pex_info(argv0) |
| 38 | if pex_info and is_python_script(argv0, check_executable=False): |
| 39 | try: |
| 40 | return [Virtualenv(os.path.dirname(argv0)).interpreter.binary] + list(args) |
| 41 | except InvalidVirtualenvError: |
| 42 | pass |
| 43 | if pex_info or argv0.endswith(".py"): |
| 44 | return [sys.executable] + list(args) |
| 45 | return args if isinstance(args, list) else list(args) |
| 46 | |
| 47 | |
| 48 | def call( |
no test coverage detected