Return appropriate IPython command line name. By default, this will return a list that can be used with subprocess.Popen, for example, but passing `as_string=True` allows for returning the IPython command as a string. Parameters ---------- as_string: bool Flag to al
(as_string: bool=False)
| 142 | |
| 143 | |
| 144 | def get_ipython_cmd(as_string: bool=False) -> List[str]: |
| 145 | """ |
| 146 | Return appropriate IPython command line name. By default, this will return |
| 147 | a list that can be used with subprocess.Popen, for example, but passing |
| 148 | `as_string=True` allows for returning the IPython command as a string. |
| 149 | |
| 150 | Parameters |
| 151 | ---------- |
| 152 | as_string: bool |
| 153 | Flag to allow to return the command as a string. |
| 154 | """ |
| 155 | ipython_cmd = [sys.executable, "-m", "IPython"] |
| 156 | |
| 157 | if as_string: |
| 158 | ipython_cmd = " ".join(ipython_cmd) |
| 159 | |
| 160 | return ipython_cmd |
| 161 | |
| 162 | def ipexec(fname: str, options: Optional[List[str]]=None, commands: Tuple[str, ...]=()) -> Tuple[str, str]: |
| 163 | """Utility to call 'ipython filename'. |
no outgoing calls
no test coverage detected
searching dependent graphs…