We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
应该是 export PYTHONPATH = /home/qw/python:$PYTHONPATH ,然后执行 source /etc/profile 。 最后的代码段中,cd python 后使用 python 命令进入交互模式,然后引用 mypm 模块一定会成功,因为 sys.path 返回的列表中第 0 项 '' 空字符串就是指当前文件夹 (/python) 。
The text was updated successfully, but these errors were encountered:
已经修改,请看:https://github.com/qiwsir/StarterLearningPython/blob/master/219.md ,是否妥当?请指正。
2015-12-07 11:54 GMT+08:00 Hsinwe [email protected]:
应该是 export PYTHONPATH = /home/qw/python:$PYTHONPATH ,然后执行 source /etc/profile 。 最后的代码段中,cd python 后使用 python 命令进入交互模式,然后引用 mypm 模块一定会成功,因为 sys.path 返回的列表中第 0 项 '' 空字符串就是指当前文件夹 (/python) 。 — Reply to this email directly or view it on GitHub #36.
— Reply to this email directly or view it on GitHub #36.
QiWei
Sorry, something went wrong.
我觉得后面 cd python | python | import mypm 的示例可以改成 cd anotherpython | python | import mypm, sys | sys.path ,以此显示告知的效果。不理解为什么老师使用的是引用当前工作文件夹中的模块的例子?
你说的有道理。但是并没有在这方面思想太多。我倒是觉得,把你这个问题发到教程中,让学习者来体会,更好一些。这样能引导大家动脑筋。比看我写的强多了。多谢你的指正。
No branches or pull requests
应该是 export PYTHONPATH = /home/qw/python:$PYTHONPATH ,然后执行 source /etc/profile 。
最后的代码段中,cd python 后使用 python 命令进入交互模式,然后引用 mypm 模块一定会成功,因为 sys.path 返回的列表中第 0 项 '' 空字符串就是指当前文件夹 (/python) 。
The text was updated successfully, but these errors were encountered: