sc3nb.magics
This module adds the Jupyter specialties such as Magics and Keyboard Shortcuts
Module Contents
Function List
Function that is called when Jupyter loads this as extension (%load_ext sc3nb) |
|
Add the server 'free all' shortcut. |
Class List
IPython magics for SC class |
Content
- sc3nb.magics.load_ipython_extension(ipython) None [source]
Function that is called when Jupyter loads this as extension (%load_ext sc3nb)
- Parameters:
- ipythonIPython
IPython object
- sc3nb.magics.add_shortcut(ipython, shortcut: str = None) None [source]
Add the server ‘free all’ shortcut.
- Parameters:
- ipythonIPython
IPython object
- shortcutstr, optional
shortcut for ‘free all’, by default it is “cmd-.” or “Ctrl-.”
- class sc3nb.magics.SC3Magics(shell=None, **kwargs)[source]
Bases:
IPython.core.magic.Magics
IPython magics for SC class
Create a configurable given a config config.
- Parameters:
- configConfig
If this is empty, default values are used. If config is a
Config
instance, it will be used to configure the instance.- parentConfigurable instance, optional
The parent Configurable instance of this object.
Notes
Subclasses of Configurable must call the
__init__()
method ofConfigurable
before doing anything else and usingsuper()
:class MyConfigurable(Configurable): def __init__(self, config=None): super(MyConfigurable, self).__init__(config=config) # Then any other code you need to finish initialization.
This ensures that instances will be configured properly.
Overview:
Execute SuperCollider code via magic
Execute SuperCollider code with verbose output
Execute SuperCollider code silently (verbose==False)
Execute SuperCollider code returning output
Execute SuperCollider code returning output
Execute SuperCollider code returning output
Parses SuperCollider code for python variables and their values
- sc(line='', cell=None)[source]
Execute SuperCollider code via magic
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result
- scv(line='', cell=None)[source]
Execute SuperCollider code with verbose output
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result
- scs(line='', cell=None)[source]
Execute SuperCollider code silently (verbose==False)
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result
- scg(line='', cell=None)[source]
Execute SuperCollider code returning output
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result Output from SuperCollider code, not all SC types supported, see pythonosc.osc_message.Message for list of supported types
- scgv(line='', cell=None)[source]
Execute SuperCollider code returning output
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result Output from SuperCollider code, not all SC types supported, see pythonosc.osc_message.Message for list of supported types
- scgs(line='', cell=None)[source]
Execute SuperCollider code returning output
- Parameters:
- linestr, optional
Line of SuperCollider code, by default ‘’
- cellstr, optional
Cell of SuperCollider code , by default None
- Returns:
- Unknown
cmd result Output from SuperCollider code, not all SC types supported, see pythonosc.osc_message.Message for list of supported types