pygameというライブラリでmp3が再生できるらしいので,Raspberry Piにインストールしようとしたのですが,どうやらデフォルトで入っていたみたい。無かった人は↓のコマンド $ sudo apt-get install python-pygame 実際にプログラム書いてみる。 #!/usr/bin/env python #coding:utf-8 import pygame.mixer import time pygame.mixer.init() pygame.mixer.music.load('test.mp3') pygame.mixer.music.play(2) # ()内は再生回数 -1:ループ再生 #pygame.mixer.music.pause() # 音楽の一時停止 #pygame.mixer.music.unpause # 一時停止した音楽の再開 #pyga