【发布时间】:2017-02-22 08:42:24
【问题描述】:
我正在尝试将参数(目录)传递给 ipython notebook 中的 %cd 命令,如下所示:
rootdir = "D:\mydoc"
%cd rootdir
但我收到以下错误:
[Error 2] The system cannot find the file specified: u'rootdir'
D:\mydoc
当我在做的时候
%cd D:\mydoc
这显然可行,但我希望能够使用参数指定我的工作目录...
非常感谢能帮助我的人。
最好的祝福
【问题讨论】:
标签: python directory ipython parameter-passing jupyter-notebook