dartpy 0.0.1 copy "dartpy: ^0.0.1" to clipboard
dartpy: ^0.0.1 copied to clipboard

outdated

A starting point for Dart libraries or applications.

example/dartpy_example.dart

import 'dart:ffi';

import 'package:dartpy/dartpy.dart';
import 'package:ffi/ffi.dart';

void main(List<String> args) {
  dartpyc.Py_Initialize();
  final python = '''
from time import time, ctime
print("Today is", ctime(time()))
''';
  final pystring = python.toNativeUtf8();
  dartpyc.PyRun_SimpleString(pystring.cast<Int8>());
  malloc.free(pystring);
  print(dartpyc.Py_FinalizeEx());
}
36
likes
0
pub points
75%
popularity

Publisher

verified publishertimwhiting.dev

A starting point for Dart libraries or applications.

Repository
View/report issues

License

unknown (LICENSE)

Dependencies

ffi, freezed_annotation, path

More

Packages that depend on dartpy