File: subprocess.py

package info (click to toggle)
python-astropy-helpers 0.4.3-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 540 kB
  • ctags: 584
  • sloc: python: 5,173; ansic: 88; makefile: 11
file content (19 lines) | stat: -rw-r--r-- 552 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
A replacement wrapper around the subprocess module that adds
check_output (which was only added to Python in 2.7.

Instead of importing subprocess, other modules should use this as follows::

    from astropy.utils.compat import subprocess

This module is safe to import from anywhere within astropy.
"""
from __future__ import absolute_import, print_function

import subprocess

# python2.7 and later provide a check_output method
if not hasattr(subprocess, 'check_output'):
    from ._subprocess_py2 import check_output

from subprocess import *