Ok, I looked through the code and found some hints.

Basically swig is based on a .i file that is sort of C-ish but
provides interface routines for different languages.

For instance, owfs.i is about 100 lines, and provides all the
interface routines like get, put, init, finish. I've attached it as an
example. It can be compiled directly to any of the supported
languages. All the owfs programs either use swig, of call a simplified
C library directly (owcapi) that looks a lot like swig, or use a
network protocol (ownet) that looks a lot like swig.

fann dose things a little differently. There is a pyfann.i in one of
the directories. I think they design separate interfaces for each of
the languages, which loses much of swig's flexibility. You could try
compiling that for php (see owfs/modules/swig for Makefile examples)
but the interface and resulting functions would need to be tested.
There may be python-specific handling of buffers and memory implicit
in its design.

Paul Alfille

On Thu, Nov 18, 2010 at 12:05 AM, Roberto Spadim <[email protected]> wrote:
> hi guys, i need help...
> there's a neural network library (fann) that php module isn't working...
> there's a python (swig) interface code, that works
> anybody could help me making this python swig interface work with php swig
> interface?
> the project is very interesting (neural network)
>
> check:
> http://leenissen.dk/fann/
>
> source code:
> http://prdownloads.sourceforge.net/fann/fann-2.0.0.tar.gz?download
>
> python swig source location inside .tar.gz file:
> ./python/pyfann/
>
> thanks guys, i'm not a swig programer yet :(
>
> --
> Roberto Spadim
> Spadim Technology / SPAEmpresarial
>
> ------------------------------------------------------------------------------
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
>

Attachment: ow.i
Description: Binary data

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to