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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Troop v0.9.6
# Troop v0.9.8

## Real-time collaborative live coding

Expand Down
10 changes: 8 additions & 2 deletions src/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from subprocess import PIPE, STDOUT
from datetime import datetime

import subprocess
import os

# Import OSC library depending on Python version

if PY_VERSION == 2:
Expand Down Expand Up @@ -390,7 +393,10 @@ def start(self):

try:

process = Popen(["ghc-pkg", "field", "tidal", "data-dir"], stdout=PIPE, universal_newlines=True)

ghc_numver = 'ghc-' + subprocess.run(['ghc', '--numeric-version'], stdout=subprocess.PIPE).stdout.decode('utf-8').rstrip()
pack_db = os.environ["HOME"] + "/.cabal/store/" + ghc_numver + "/package.db"
process = Popen(["ghc-pkg", "field", "-f", pack_db, "tidal", "data-dir"], stdout=PIPE, universal_newlines=True)

output = process.communicate()[0]

Expand Down Expand Up @@ -679,4 +685,4 @@ def stop_sound(cls):
DUMMY : DummyInterpreter }

for lang_id, lang_cls in langtypes.items():
lang_cls.id = lang_id
lang_cls.id = lang_id