Permalink
Browse files

starting a basic test

  • Loading branch information...
1 parent 018334f commit 5f2358db9990c76eb6a6f0883a81a40ec5de354d @tarekziade committed Jul 1, 2012
Showing with 18 additions and 0 deletions.
  1. +18 −0 player.py
View
@@ -0,0 +1,18 @@
+import os
+import subprocess
+
+ROOT = '/media/usbstick'
+CMD = 'mpg123 "%s"'
+
+
+def get_list():
+ for file in os.listdir(ROOT):
+ if not file.endswith('.mp3'):
+ continue
+ yield os.path.join(ROOT, file)
+
+
+
+for file in get_list():
+ subprocess.call(CMD % file, shell=True)
+

0 comments on commit 5f2358d

Please sign in to comment.