当我尝试执行查询时出现错误 return 我是变量的路径
I have error while i tried to execute query which return me a path to variable
我尝试使用 python
在一个位置打开多个文件
当我尝试执行这个小脚本时出现错误:
Traceback (most recent call last): File "", line 254, in run_nodebug
File "C:\Users\kostrzew\Desktop\REPORTS\MdiAdmin.py", line 21, in
file_path = glob(os.path.join(dir,"*.mdi")) TypeError: 'module' object is not callable
import os
import string
import re
import sys
import glob
src = raw_input("Enter source disk location: ")
src = os.path.dirname(src)
for dir,_,_ in os.walk(src):
file_path = glob(os.path.join(dir,"*.mdi"))
print(file_path)
glob
是模块的名字,函数的名字是glob.glob
.
file_path = glob.glob(os.path.join(dir,"*.mdi"))
我尝试使用 python
在一个位置打开多个文件当我尝试执行这个小脚本时出现错误:
Traceback (most recent call last): File "", line 254, in run_nodebug File "C:\Users\kostrzew\Desktop\REPORTS\MdiAdmin.py", line 21, in file_path = glob(os.path.join(dir,"*.mdi")) TypeError: 'module' object is not callable
import os
import string
import re
import sys
import glob
src = raw_input("Enter source disk location: ")
src = os.path.dirname(src)
for dir,_,_ in os.walk(src):
file_path = glob(os.path.join(dir,"*.mdi"))
print(file_path)
glob
是模块的名字,函数的名字是glob.glob
.
file_path = glob.glob(os.path.join(dir,"*.mdi"))