25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
440 B

  1. import os, inspect
  2. import subprocess
  3. musicdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+"/music"+"/1"
  4. for (path, dirnames, filenames) in os.walk(musicdir):
  5. #folders.extend(os.path.join(path, name) for name in dirnames)
  6. for name in filenames:
  7. file = os.path.join(path, name)
  8. #os.system("mpg123 " + "'" + file + "'")
  9. #os.system("")
  10. subprocess.run(["mpg123", file])