Python中"readelf -h Demo.elf"与"python readelf.py -h Demo.elf"命令的区别是什么?

在 D:\Python27\Scripts 目录下有个脚本文件 readelf.py

使用"readelf -h Demo.elf"直接执行时脚本得到的参数 sys.argv 中只有文件名,后面两个参数-h 和 Demo.elf 都没有

通过"python readelf.py -h Demo.elf"执行时脚本可以得到三个参数

请问这正常吗??为什么会这样子??能够解决让"readelf -h Demo.elf"时脚本程序也能得到参数吗??


Python中"readelf -h Demo.elf"与"python readelf.py -h Demo.elf"命令的区别是什么?

4 回复

正常。没办法,因为 exec 应该不是一样的吧


我无法理解你的问题。


多谢,确实是这个问题,,

回到顶部