~ubuntu-branches/debian/sid/cde/sid

« back to all changes in this revision

Viewing changes to scripts/cde_script_utils.py

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2012-02-03 19:27:05 UTC
  • Revision ID: package-import@ubuntu.com-20120203192705-ll6f1nr45ead65ed
Tags: upstream-0.1
ImportĀ upstreamĀ versionĀ 0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import subprocess
 
2
 
 
3
def run_cmd(args):
 
4
  (cmd_stdout, cmd_stderr) = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
 
5
  return (cmd_stdout, cmd_stderr)
 
6
 
 
7
 
 
8
def is_dynamic_ELF_exe(filename):
 
9
  file_out, _ = run_cmd(['file', filename])
 
10
  return ("ELF" in file_out and "executable" in file_out and "dynamically linked" in file_out)