Skip to content

Commit

Permalink
Add example for %pwd magic command.
Browse files Browse the repository at this point in the history
  • Loading branch information
08saikiranreddy authored and takluyver committed Feb 14, 2011
1 parent e372c2f commit c377a7c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion IPython/core/magic.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2605,7 +2605,16 @@ def magic_rehashx(self, parameter_s = ''):
os.chdir(savedir) os.chdir(savedir)


def magic_pwd(self, parameter_s = ''): def magic_pwd(self, parameter_s = ''):
"""Return the current working directory path.""" """Return the current working directory path.
Example
-------
::
In [9]: pwd
Out[9]: '/home/tsuser/sprint/ipython'
"""
return os.getcwd() return os.getcwd()


def magic_cd(self, parameter_s=''): def magic_cd(self, parameter_s=''):
Expand Down

0 comments on commit c377a7c

Please sign in to comment.