Skip to content

Commit

Permalink
Jupyter kernel: make sure that implementation and `implementation_v…
Browse files Browse the repository at this point in the history
…ersion` are properly set (#2250).
  • Loading branch information
agarny committed Dec 3, 2019
1 parent 4d55939 commit 527e883
Showing 1 changed file with 10 additions and 4 deletions.
Expand Up @@ -26,6 +26,10 @@ along with this program. If not, see <https://gnu.org/licenses>.

//==============================================================================

#include <QCoreApplication>

//==============================================================================

namespace OpenCOR {
namespace JupyterKernel {

Expand Down Expand Up @@ -133,18 +137,20 @@ matplotlib.rcParamsOrig['backend'] = matplotlib.rcParams['backend']
# Minimal customisation of the standard IPython kernel
class OpenCORKernel(IPythonKernel):
implementation = 'OpenCOR'
implementation_version = '0.6'
implementation = '%1'
implementation_version = '%2'
banner = "Jupyter kernel for OpenCOR"
if __name__ == '__main__':
from ipykernel.kernelapp import IPKernelApp
IPKernelApp.connection_file = '%1'
IPKernelApp.connection_file = '%3'
IPKernelApp.launch_instance(kernel_class=OpenCORKernel)
)PYTHON";

PythonQtSupport::evaluateScript(JupyterKernel.arg(QString(pArguments[0]).replace("\\", "\\\\")));
PythonQtSupport::evaluateScript(JupyterKernel.arg(qApp->applicationName(),
qApp->applicationVersion(),
QString(pArguments[0]).replace("\\", "\\\\")));

return true;
}
Expand Down

0 comments on commit 527e883

Please sign in to comment.