【发布时间】:2019-06-02 11:39:53
【问题描述】:
我正在构建一个需要访问同一文件夹中资源的应用程序(它需要 xsd 文件来验证输入文件)。
我怎样才能可靠地访问这个 xsd 文件?
详细说明:
-
我需要能够调用可执行文件:
cd not/the/directory/of/the/program path/to/program -c config.xml -
这里使用的路径是什么?
subprocess.Popen("xmllint --noout --schema ?/?/config.xsd " + configfilename)
【问题讨论】:
-
你应该可以通过
os.getcwd()获得当前的工作目录?
标签: python relative-path absolute-path