diff options
author | Rafael Ortiz <dirakx@gmail.com> | 2011-02-25 21:40:07 (GMT) |
---|---|---|
committer | Rafael Ortiz <dirakx@gmail.com> | 2011-02-25 21:40:07 (GMT) |
commit | 0c8e687ce284d7599b9bfb7c578b0fc7fb32c493 (patch) | |
tree | 0de859c2cc0fb5850e6d87daf2407d61d40c00e3 /common/Util/OS.py | |
parent | bc9dd5c653e667d19c88092160b0f664e08ae7d8 (diff) |
fixing simlimking build error
Diffstat (limited to 'common/Util/OS.py')
-rw-r--r-- | common/Util/OS.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/common/Util/OS.py b/common/Util/OS.py deleted file mode 100644 index 605fbf4..0000000 --- a/common/Util/OS.py +++ /dev/null @@ -1,36 +0,0 @@ -import commands -import logging -import os - -import common.Config as Config - -def system(*args): - cmd = ' '.join(args) - logging.debug('[system] %s' % cmd) - - status = commands.getstatusoutput(cmd) - logging.debug('[system][out] %d: %s' % status) - - return status - -def arecord(duration, crop_csd, dst): - tmp_file = os.path.join(Config.TMP_DIR, 'tempMic.wav') - out_file = os.path.join(Config.TMP_DIR, 'micTemp.wav') - crop_file = os.path.join(Config.FILES_DIR, crop_csd) - dst_file = os.path.join(Config.DATA_DIR, dst) - - if system(Config.ARECORD, "-d", str(duration), tmp_file)[0] != 0: - logging.error('arecord failed') - return False - - system("csound", "--strset999=" + Config.TMP_DIR, crop_file) - - if os.path.isfile(dst): - os.remove(dst_file) - - if os.path.isfile(out_file): - os.rename(out_file, dst_file) - os.remove(tmp_file) - else: - logging.debug('crop failed') - os.rename(tmp_file, dst_file) |