Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pysplit/client/curses_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
import signal
import datetime
import traceback
from functools import partial
from time import sleep
from os.path import isfile
from threading import Thread
from subprocess import check_call
from pysplit.client import records
from pysplit.config import cfg
from multiprocessing import Process
from playsound import playsound


def now():
Expand Down Expand Up @@ -213,9 +214,8 @@ def print(self, string):

@staticmethod
def play_sound(sound_file):
if isfile(sound_file):
t = Thread(target=check_call, args=(['afplay', sound_file],))
t.start()
if sound_file and isfile(sound_file):
Process(target=partial(playsound, sound_file)).start()


class Descriptor:
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
name='PySplit',
version=pysplit.__version__,
packages=['pysplit', 'pysplit.client'],
install_requires=['requests>=2.20.0', 'PyYAML>=5.3.1',
'Flask>=1.1.2', 'tornado>=5.1', 'playsound>=1.2'],
entry_points={
'console_scripts': ['pysplit = pysplit.runner:main']
}
Expand Down