Return the current working directory path. Examples -------- :: In [9]: pwd Out[9]: '/home/tsuser/sprint/ipython'
(self, parameter_s='')
| 282 | @skip_doctest |
| 283 | @line_magic |
| 284 | def pwd(self, parameter_s=''): |
| 285 | """Return the current working directory path. |
| 286 | |
| 287 | Examples |
| 288 | -------- |
| 289 | :: |
| 290 | |
| 291 | In [9]: pwd |
| 292 | Out[9]: '/home/tsuser/sprint/ipython' |
| 293 | """ |
| 294 | try: |
| 295 | return os.getcwd() |
| 296 | except FileNotFoundError: |
| 297 | raise UsageError("CWD no longer exists - please use %cd to change directory.") |
| 298 | |
| 299 | @skip_doctest |
| 300 | @line_magic |