如何通过.EXE Python程序打开哪个文件
因此,我正在尝试创建一个程序,该程序能够读取自己的类型的文件类型,
以想象一个名为 hello.world 的文件
,并且您有一个.exe程序,您可以使用该程序。
该程序是我的Python文件,那么使用该.EXE打开哪个文件的实际方式是什么?
So I am trying to create a program that would be able to read its own types of files
Imagine there is a file called hello.world
And you have a .exe program that you can open this file with.
This program is my python file, so what is actually the way of getting which file was opened with that .exe?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
经过评论中的小讨论:
可以使用 sys.argv 来获取文件路径:
从 python 中的命令行参数获取文件路径
After a small discussion in the comments:
it is possible to use sys.argv to get the file path:
getting file path from command line argument in python