python_shell

Creator: coderz1093

Last updated:

0 purchases

python_shell Image
python_shell Images
Add to Cart

Description:

python shell

python_shell


Python Environment Manager and Executor for dart and flutter




Available for:

dart, flutter

Supported Platforms:

Windows 10+ (x86, amd64, arm64)
Linux Distos (amd64, arm64)
OSX 11+ (amd64, arm64)





Install #

add via cli

flutter(dart) pub add python_shell
copied to clipboard

add dependency to 'pubspec.yaml'

dependencies:
[other dependencies...]

python_shell:
git:
url: git://github.com/eseunghwan/python_shell.dart.git
ref: master
copied to clipboard

Usage #

basic usage

import "package:python_shell/python_shell.dart";

var shell = PythonShell();
await shell.initialize();

await shell.runString("{pythonCode}");
copied to clipboard

use instance

import "package:python_shell/python_shell.dart";

PythonShell().initialize();
var instance = ShellManager.getInstance("default");
await instance.runString("{pythonCode}");
copied to clipboard


onMessage, onError, onComplete

// setups like above ...
shell.runString(
"{pythonCode}",
listener: ShellListener(
onMessage: (message) {
// if `echo` is `true`, log to console automatically
print("message!");
},
onError: (e, s) {
print("error!");
},
onComplete: () {
print("complete!");
}
)
);
copied to clipboard

for further informations, refers to shell.dart

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.