美文网首页
Mac找不到文件位置

Mac找不到文件位置

作者: kingloongMagic | 来源:发表于2023-11-05 16:56 被阅读0次
# -*- coding: utf-8 -*-
# @Author: zhangfujie
# @Date:   2019-09-05 22:36:05
# @Last Modified by:   zhangfujie
# @Last Modified time: 2019-09-07 22:36:58
import os, sys
 
# 获取路径
def getPath(fileName):
    path = os.path.join(os.path.dirname(sys.argv[0]), fileName)
    return path
 
# 这是我的配置文件的路径
obsLibConfigPath = getPath('ZFJObsLibConfig')
 
# 这是我词库的路径
lexiconPath = getPath('lexicon20.txt') 
 
if __name__ == '__main__':
    print(lexiconPath)

相关文章

网友评论

      本文标题:Mac找不到文件位置

      本文链接:https://www.haomeiwen.com/subject/trazidtx.html