1

I am trying to create an auto-FoxDot installer which is a tool for making music with foxdot.

In order to install FoxDot you need to run Quarks.install("FoxDot") and FoxDot.start to run it.

I want these to be run automatically by the python script rather than having the user run these themselves.

Any ideas would be appreciated, thank you.

Currently the user is just entering the code and running it themselves.

Giorgos Myrianthous
  • 36,235
  • 20
  • 134
  • 156
Moz
  • 31
  • 3
  • What have you tried so far? I assume what you're looking for is `subprocess`. – Vulpex Mar 30 '19 at 16:04
  • I've been looking online and looked into using SCLang to run the code from python. I can barely find anything though - it isn't really something that i've seen done before – Moz Mar 30 '19 at 16:07

1 Answers1

1

For SuperCollider incremental builds/tests, we use a Python wrapper qpm (the qpm-unit branch) to set-up and launch SC. It is capable of both installing Quarks by itself, and running arbitrary code snippets in SuperCollider from the command line:

https://github.com/scztt/qpm/tree/qpm-unit

pip2 install git+https://github.com/scztt/qpm.git@qpm-unit
mkdir /tmp/quarks
qpm quark list
qpm quark checkout FoxDot -l /tmp/quarks
qpm execute "FoxDot.postln" -i /tmp/quarks -p /Applications/SuperCollider

It is not a formally supported tool, as it is currently only used for a very narrow case of running unit tests in SC, but you should be able to either use it to get what you're looking for, or re-purpose some of the code for your FoxDot installer.

scztt
  • 1,053
  • 8
  • 10