认为:
- dir1
- subdir
- installed_module
- dir2
- dbfile
这是我的文件夹结构。我想找到dbfile
,我在其他目录中。如何pkg_resources
在 python 中使用来查找dbfile
使用已安装模块的位置installed_module
?
我尝试使用 pkg_resources.resource_filename('installed_module', dbfile) 来获得一些不是我所期望的路径。