推荐学习书目
› 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
pyengwoei
V2EX  ›  Python

请问 Popen 模块的这一坨参数是什么意思

  •  
  •   pyengwoei · Aug 31, 2016 · 2914 views
    This topic created in 3676 days ago, the information mentioned may be changed or developed.

    网上说的用法不是这样吗
    aaa = "G:/New.exe"
    Popen(aaa, shell=True)
    8 replies  •  2016-09-01 11:04:52 +08:00
    julyclyde
        1
    julyclyde  
       Aug 31, 2016
    Popen 模块是什么?
    julyclyde
        2
    julyclyde  
       Aug 31, 2016
    提醒你注意一下那个方括号,再参悟一下函数调用的语法
    ericls
        3
    ericls  
       Aug 31, 2016
    那只是列表里面的元素而已
    zguangyu123
        4
    zguangyu123  
       Aug 31, 2016
    这些参数是传给 popen 调用的程序的参数。
    pyengwoei
        5
    pyengwoei  
    OP
       Aug 31, 2016
    @zguangyu123 Popen 的参数我看格式都不是这样的啦
    pyengwoei
        6
    pyengwoei  
    OP
       Aug 31, 2016
    @ericls 我知道是列表里面的元素,但是这个传进去有什么用啦
    julyclyde
        7
    julyclyde  
       Aug 31, 2016
    @pyengwoei 起什么作用要由被运行的那个程序来解释
    zerofiny
        8
    zerofiny  
       Sep 1, 2016
    subprocess.Popen 你标注那些是执行程序需要的参数
    这个函数执行带参数 就是 Popen(['ls', '-als'])
    这个函数一系列参数 bufsize=0, executable=None, stdin=None, stdout=None, stderr=None, preexec_fn=None, close_fds=False, shell=False, cwd=None, env=None, universal_newlines=False, startupinfo=None, creationflags=0
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   916 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 19:23 · PVG 03:23 · LAX 12:23 · JFK 15:23
    ♥ Do have faith in what you're doing.