Reputation: 10758
%cd
magic commandCan the %cd
magic command in iPython be made to not show the output path? If you pass a relative path or start from a shortcut ~/
, this can be nice when sharing notebooks, but the output shows a full path which may not be relevant to the audience.
In [1]: %cd ~/GitHub/someplace
/Users/accountname/GitHub/someplace
In [2]: |
It would be nice to either return nothing or return the relative path...
Upvotes: 2
Views: 628
Reputation: 10758
%cd
magic commandThe iPython magic command provides a quiet option. Use the -q
option to not display the output.
In [1]: %cd -q ~/GitHub/someplace
In [2]: |
Upvotes: 4