Python subprocess._args_from_interpreter_flags() Examples

The following are code examples for showing how to use subprocess._args_from_interpreter_flags(). They are extracted from open source Python projects. You can vote up the examples you like or vote down the exmaples you don't like. You can also save this page to your account.

Example 1
Project: hakkuframework   Author: 4shadoww   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 2
Project: oil   Author: oilshell   File: test_support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags."""
    import subprocess
    return subprocess._args_from_interpreter_flags() 
Example 3
Project: python2-tracer   Author: extremecoders-re   File: test_support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags."""
    import subprocess
    return subprocess._args_from_interpreter_flags() 
Example 4
Project: packaging   Author: blockstack   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 5
Project: islam-buddy   Author: hamir   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 6
Project: web_ctp   Author: molebot   File: __init__.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 7
Project: FightstickDisplay   Author: calexil   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 8
Project: cryptogram   Author: xinmingzhang   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 9
Project: autosub-bootstrapbill   Author: BenjV   File: _cpcompat.py    (license) View Source Project 5 votes vote down vote up
def _args_from_interpreter_flags():
        """Tries to reconstruct original interpreter args from sys.flags for Python 2.6

        Backported from Python 3.5. Aims to return a list of
        command-line arguments reproducing the current
        settings in sys.flags and sys.warnoptions.
        """
        flag_opt_map = {
            'debug': 'd',
            # 'inspect': 'i',
            # 'interactive': 'i',
            'optimize': 'O',
            'dont_write_bytecode': 'B',
            'no_user_site': 's',
            'no_site': 'S',
            'ignore_environment': 'E',
            'verbose': 'v',
            'bytes_warning': 'b',
            'quiet': 'q',
            'hash_randomization': 'R',
            'py3k_warning': '3',
        }

        args = []
        for flag, opt in flag_opt_map.items():
            v = getattr(sys.flags, flag)
            if v > 0:
                if flag == 'hash_randomization':
                    v = 1 # Handle specification of an exact seed
                args.append('-' + opt * v)
        for opt in sys.warnoptions:
            args.append('-W' + opt)

        return args

# html module come in 3.2 version 
Example 10
Project: Repobot   Author: Desgard   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 11
Project: pefile.pypy   Author: cloudtracer   File: test_support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags."""
    import subprocess
    return subprocess._args_from_interpreter_flags() 
Example 12
Project: ouroboros   Author: pybee   File: __init__.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 13
Project: ndk-python   Author: gittor   File: test_support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags."""
    import subprocess
    return subprocess._args_from_interpreter_flags() 
Example 14
Project: UMOG   Author: hsab   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 15
Project: blackmamba   Author: zrzka   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 16
Project: kbe_server   Author: xiaohaoppy   File: __init__.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 17
Project: beepboop   Author: nicolehe   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 18
Project: hackathon   Author: vertica   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================ 
Example 19
Project: yatta_reader   Author: sound88   File: support.py    (license) View Source Project 5 votes vote down vote up
def args_from_interpreter_flags():
    """Return a list of command-line arguments reproducing the current
    settings in sys.flags and sys.warnoptions."""
    return subprocess._args_from_interpreter_flags()

#============================================================
# Support for assertions about logging.
#============================================================