Fast-track to installing/implementing a SWIP module?

Robert Oschler Oschler at earthlink.net
Sat Sep 28 23:43:34 EDT 2002


"Gerhard Häring" <gerhard.haering at gmx.de> wrote in message
news:slrnapcp8g.617.gerhard.haering at lilith.my-fqdn.de...
> Robert Oschler wrote in comp.lang.python:

> If I understand correcly, you only have to have SWI-Prolog in your PATH,
then
> the following:
>
>     python setup.py build
>
> will build everything and
>
>     python setup.py install
>
> will install your modules.
>
>
> Explanation: This function:
>
>     def get_atom(atom):
>         query = "pl -f none -g 'current_prolog_flag(%s, V), write(V),
nl.' -t 'halt'"
>         f = os.popen(query % atom)
>         ...
>
> in setup.py should do the magic of finding the include and library paths
to
> link against SWI Prolog.
>
> -- Gerhard

Gerhard,

Thanks that's exactly what I needed.  I'm still having a hard time with the
'ease' that things happen when doing things in Python.

thx






More information about the Python-list mailing list