diff options
author | Nathanaël Lécaudé <Nat@localhost.localdomain> | 2007-01-29 05:32:48 (GMT) |
---|---|---|
committer | Nathanaël Lécaudé <Nat@localhost.localdomain> | 2007-01-29 05:32:48 (GMT) |
commit | d1bd5c3afca2aad09701af702d018f3e99496d07 (patch) | |
tree | b1e9a11facf7adf87eb7aec1f1e5497f89bb126f /Util/CSoundNote.py | |
parent | 9b3d8e0a679913b29390fab8f2da7c68acc9bd1c (diff) |
TamTam will run in non-sugar env
Diffstat (limited to 'Util/CSoundNote.py')
-rw-r--r-- | Util/CSoundNote.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Util/CSoundNote.py b/Util/CSoundNote.py index bf215ca..148f9b1 100644 --- a/Util/CSoundNote.py +++ b/Util/CSoundNote.py @@ -3,10 +3,17 @@ from Util.CSoundClient import CSoundClient from Generation.GenerationConstants import GenerationConstants from Util.Clooper.SClient import * -from sugar import env +SugarMode = True +try: + from sugar import env +except ImportError: + SugarMode = False def CSound_loadInstruments( ): - home_path = env.get_profile_path() + Config.PREF_DIR + if SugarMode == True: + home_path = env.get_profile_path() + Config.PREF_DIR + else: + home_path = Config.SOUNDS_DIR + '/temp' for instrumentSoundFile in Config.INSTRUMENTS.keys(): if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab': fileName = home_path + '/' + instrumentSoundFile |