This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/python/examples/pyx.pl

18 lines
252 B
Perl
Raw Normal View History

2012-11-27 12:10:41 +00:00
:- use_module(library(python)).
:- initialization(main).
main :-
ex(X),
flush_output,
fail.
main.
ex(hello_world) :-
c = pyx:canvas:canvas,
:= c:text(0, 0, 'Hello, world!'),
:= c:stroke(path:line(0, 0, 2, 0)),
c.writePDFfile('hello.pdf').