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
4 changes: 2 additions & 2 deletions app/meter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""The meter module provides the Meter class."""
import thread
import multiprocessing as mp
import time
import Tkinter
from Tkinter import Canvas
Expand Down Expand Up @@ -104,7 +104,7 @@ def _run(self):
def start(self):
"""Start the meter."""
self._is_playing = True
thread.start_new_thread(self._run, ())
mp.Process(target=self._run).start()

def reset(self):
"""Reset the meter."""
Expand Down
4 changes: 2 additions & 2 deletions app/player_madao.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This implementation of Player uses python wrappers for libmad and libao,
which provide interfaces to audio files and audio devices.
"""
import thread
import multiprocessing as mp
import time
import ao
import mad
Expand Down Expand Up @@ -67,7 +67,7 @@ def play(self, callback=None):

self._is_playing = True
self._callback = callback
thread.start_new_thread(self._play_internal, ())
mp.Process(target=self._play_internal).start()

def stop(self):
"""Stop the audio stream."""
Expand Down
4 changes: 2 additions & 2 deletions app/player_vlc.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
it also uses libmad to retreive the length of the file. This implementation
seems to work, although it prints cryptic messages from time to time.
"""
import multiprocessing as mp
import os
import signal
import subprocess
import thread
import time

import mad
Expand Down Expand Up @@ -68,7 +68,7 @@ def play(self, callback=None):
self._pid = subprocess.Popen(self._command).pid
self._is_playing = True
self._callback = callback
thread.start_new_thread(self._play_internal, ())
mp.Process(target=self._play_internal).start()

def stop(self):
"""Stop the audio stream."""
Expand Down
9 changes: 3 additions & 6 deletions app/za_studio.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python

"""The Studio module provides a GUI for the digital library."""
import thread
import multiprocessing as mp
import Tkinter
from Tkinter import Frame, Label, BooleanVar, Checkbutton, Entry, Button
import database
Expand Down Expand Up @@ -124,11 +124,8 @@ def _search_internal(self):
print "Found %d results." % len(self._search_results)

def search(self, *args):
"""Search the digital library.

:param args
"""
thread.start_new_thread(self._search_internal, ())
"""Search the digital library."""
mp.Process(target=self._search_internal).start()

def select_cart(self, index):
"""Select a cart from the search results.
Expand Down
4 changes: 2 additions & 2 deletions test/test_meter.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/usr/bin/env python

"""Test suite for the meter module."""
import multiprocessing as mp
import sys
import time
import thread
from Tkinter import Frame, Canvas

sys.path.insert(0, 'app')
Expand Down Expand Up @@ -33,7 +33,7 @@ def __init__(self):
Canvas(self.master, width=900, height=100, bg='#00F').grid(row=2, column=0, columnspan=NUM_COLS)

self._meter.start()
thread.start_new_thread(self._run, ())
mp.Process(target=self._run).start()

self.master.title("Testing Program")
self.master.mainloop()
Expand Down