From fbee8354739ecb45aa70345a7ee3a7b0584e6766 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Fri, 19 Dec 2008 01:30:32 +0000 Subject: use OS.system instead of commands.getstatusoutput --- (limited to 'TamTamJam.activity/Jam/Toolbars.py') diff --git a/TamTamJam.activity/Jam/Toolbars.py b/TamTamJam.activity/Jam/Toolbars.py index 4a1d3fc..354ec15 100644 --- a/TamTamJam.activity/Jam/Toolbars.py +++ b/TamTamJam.activity/Jam/Toolbars.py @@ -18,6 +18,7 @@ from sugar.graphics.toolcombobox import ToolComboBox from common.Util.ThemeWidgets import * import common.Config as Config +from common.Util import OS class JamToolbar( gtk.Toolbar ): @@ -496,7 +497,7 @@ class LoopSettingsPalette( Palette ): def handleSound(self, widget, data=None): self.sndname = self.sounds[widget.props.value] fullname = Config.DATA_DIR + '/' + self.sndname - results = commands.getstatusoutput("du -b %s" % fullname) + results = OS.system("du -b %s" % fullname) if results[0] == 0: list = results[1].split() soundLength = float(list[0]) / 2 / 16000. @@ -543,7 +544,7 @@ class LoopSettingsPalette( Palette ): ofile.write(category) ofile.close() if copy: - (s,o) = commands.getstatusoutput('cp ' + Config.DATA_DIR + '/' + oldName + ' ' + Config.DATA_DIR + '/' + self.sndname) + OS.system('cp ' + Config.DATA_DIR + '/' + oldName + ' ' + Config.DATA_DIR + '/' + self.sndname) def set_values(self, soundLength): self.soundLength = soundLength -- cgit v0.9.1