glob.glob(pathname,*,recursive = False)中的`*`

时间:2018-10-28 04:27:22

标签: python

我读过glob — Unix style pathname pattern expansion — Python 3.7.1 documentation关于Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Ahsan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\__init__.py", line 22, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\Ahsan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module> from tensorflow.python import pywrap_tensorflow File "C:\Users\Ahsan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in <module> raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\Ahsan\AppData\Local\Programs\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Ahsan\AppData\Loca 的内容,但不知道符号glob.glob(pathname, *, recursive=False)
似乎没有必要,因为

*

glob需要1个位置参数和1个递归选项。

In [6]: glob.glob("*") Out[6]: ['third.html', 'test.sh', 'second.html', 'first.html'] In [7]: glob.glob("*","/Users/me/Desktop/draft") TypeError: glob() takes 1 positional argument but 2 were given 是什么意思?

0 个答案:

没有答案