推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
XIVN1987
V2EX  ›  Python

"readelf -h Demo.elf"与" Python readelf.py -h Demo.elf"的区别

  •  
  •   XIVN1987 · Jun 28, 2018 · 2628 views
    This topic created in 2899 days ago, the information mentioned may be changed or developed.

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

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

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

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

    3 replies    2018-06-29 09:27:43 +08:00
    lance6716
        1
    lance6716  
       Jun 28, 2018 via Android
    正常。没办法,因为 exec 应该不是一样的吧
    nyanyh
        2
    nyanyh  
       Jun 28, 2018   ❤️ 1
    XIVN1987
        3
    XIVN1987  
    OP
       Jun 29, 2018
    @nyanyh
    多谢,确实是这个问题,,
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2939 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 06:43 · PVG 14:43 · LAX 23:43 · JFK 02:43
    ♥ Do have faith in what you're doing.