def play_sound(self, sound_file):
self.stop_sound()<EOL>if sound_file:<EOL><INDENT>cmd = self.check_commands(["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"])<EOL>if cmd:<EOL><INDENT>if cmd == "<STR_LIT>":<EOL><INDENT>cmd = "<STR_LIT>"<EOL><DEDENT>sound_file = os.path.expanduser(sound_file)<EOL>c = shlex.split("<STR_LIT>".format(cmd, sound_file))<EOL>self._audio = Popen(c)<EOL><DEDENT><DEDENT>
Plays sound_file if possible.