python - 尝试使用 mkdir 时 Python 中的语法无效

标签 python syntax syntax-error

我正在尝试通过教程学习 Python。我应该使用 mkdir 创建一个文件夹,但是当我尝试这样做时,我看到了这个结果:

> python
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information. 
>>> mkdir mystuff
  File "<stdin>", line 1
    mkdir mystuff
                ^
SyntaxError: invalid syntax

我无法从教程中弄清楚这一点。这里有什么问题,我该如何解决?

最佳答案

命令mkdir mystuff需要从系统命令行使用,而不是Python。

关于python - 尝试使用 mkdir 时 Python 中的语法无效,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23123514/

相关文章:

go - go中[""]是什么意思

Python for-else 关系

python - 语法错误 - ] 在返回行的末尾

Javascript语法错误意外标记非法

python - 为什么我的代码中出现 KeyError 'main'?

javascript - 在 Python 应用程序中使用 WebKitGtk+ 时,有没有办法从 JS 调用 Python 函数?

python - bool 索引 n 维 Numpy 数组

python - interpolate.griddata 结果不一致

python - 复杂语法 - Python

javascript - 使用 jQuery 和/或 Javascript 报告 JSON 对象中的语法错误