Commit e5c7e994 authored by Stefan Israelsson Tampe's avatar Stefan Israelsson Tampe

Merge branch 'fix-readme-usage' into 'master'

some README improvements including usage information from guile-user

See merge request !2
parents 76cf4c22 e3bbd676
In order to use this package one need the stis-parser installed.
* Prerequisites
https://gitlab.com/tampe/stis-parser
In order to use this package one needs the stis-parser installed.
https://gitlab.com/tampe/stis-parser
With this you can compile a guile python file to any target from tree-il e.g.
With this you can compile a guile python file to any of the targets of
tree-il.
Example:
stis> ~/src/guile/meta/guild compile test.py --output=test.go --from=python
> guild compile test.py --output=test.go --from=python
You also need guile-persist v1.0.0 or later
https://gitlab.com/tampe/guile-persist
To try it either put a python module file in language/python/module/. or try the interactive python shell via
,L python
To try it, either put a python module file in
language/python/module/. or try the interactive python shell via
For a newbie install it (see below) and start the python shell in modules/python
program. You can also run python source files with that program.
,L python
For a newbie, install it (see below) and start the python shell in
modules/python program. You can also run python source files with that
program.
* Installation
To install the repository, go to the module directory and issue
> autoreconf -i
> ./configure
> make
> sudo make install
* Usage
There are different usage modes of python-on-guile:
1) The main bindings are reachable through
(language python module python)
Example:
> (use-modules (language python module python))
> ,L python
This will result in aa python shell that works quite ok for one liners.
2) If you write a module and place it in a/b/c.py you can use the
classes and functions therein through
(use-modules (a b c))
3) You can load a .py file as (i hope this work)
(load "a.py")
4) If you place a module in language/python/module/a.py you can
import it as a usual from python using
> from a import *
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment