run method

  1. @override
Future<MontyResult> run(
  1. String code, {
  2. MontyLimits? limits,
  3. String? scriptName,
})
override

Runs Python code to completion in the background Isolate.

If scriptName is non-null, it overrides the default filename in tracebacks and error messages.

Implementation

@override
Future<MontyResult> run(
  String code, {
  MontyLimits? limits,
  String? scriptName,
}) async {
  final response = await _send<_RunResponse>(
    _RunRequest(_nextId++, code, limits: limits, scriptName: scriptName),
  );

  return response.result;
}