Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# Copyright (c) 2014, Facebook, Inc. All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. #
For most standard library moves and discrepancies, you should use `six` instead """
except ImportError: # Python2.6 compatibility from ordereddict import OrderedDict
except ImportError: import subprocess
def check_output(args, stdin=None, stderr=None, shell=False, universal_newlines=False): """Mostly compatible `check_output` for python2.6""" p = subprocess.Popen(args, stdin=stdin, stderr=stderr, shell=shell, universal_newlines=universal_newlines) output, stderr = p.communicate() returncode = p.wait() if returncode != 0: raise subprocess.CalledProcessError(returncode, cmd=args, output=output) return output |