~vorlon/ubuntu/saucy/gourmet/trunk

« back to all changes in this revision

Viewing changes to src/lib/sound.py

  • Committer: Bazaar Package Importer
  • Author(s): Rolf Leggewie
  • Date: 2008-07-26 13:29:41 UTC
  • Revision ID: james.westby@ubuntu.com-20080726132941-6ldd73qmacrzz0bn
Tags: upstream-0.14.0
ImportĀ upstreamĀ versionĀ 0.14.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
try:
 
2
    from sound_gnome import Player
 
3
except ImportError:
 
4
    print 'No gnome player'
 
5
    try:
 
6
        from sound_windows import Player
 
7
    except ImportError:
 
8
        print 'No windows player'
 
9
        import sys
 
10
        class Player:
 
11
            """Fallback player"""
 
12
            def play_file (self,path):
 
13
                print 'No player installed -- beeping instead'
 
14
                for n in range(5): sys.stdout.write('\a'); sys.stdout.flush()
 
15
 
 
16
print 'Player is ',Player
 
 
b'\\ No newline at end of file'