From: Colin G. <c.g...@nc...> - 2009-02-11 16:02:00
|
Hi Michele, An easier way to interface with python is to use the ctypes library (I think it's part of the standard python installation). It would also make your code much more portable. To use ctypes is quite straighforward see www.jjj.sun.ac.za/~bgoli/codelib/libsbml3_ctypes-0.1.py for an example of using it with libsbml (of course you should just use the libsbml binding for python that is provided.) To access a C library, you have to be able to build a dynamic version of the library. Christoph, is it possible to create a dynamic version of ODEsolver? HTH, Colin Michele Mattioni wrote: > Can you tell me how to do that in C/C++? > > In the worst case scenario I can try to see how to integrate a C code > part directly in my application. > I need to see if I can achieve the results that I need for my > simulation, then I can try to play with swig. > > If you can send me the swig command you used for perl we can start > with really ugly but working python > bindings and refine them on the way :) > > Cheers, > Michele. > > > On Wed, Feb 11, 2009 at 3:37 PM, Christoph Flamm <xt...@tb...> wrote: >> hi michele, >> >> things like are in principle possible. Unfortunately the only bindings we >> currently have are Perl (experimental) and R bindings. To semi-automate the >> generation of the Perl bindings we use SWIG (http://www.swig.org/). >> >> Since we wanted to avoid to "pollute" the SOSlib Perl namespace with >> additional bindings to libSBML types like SBMLDocument_t (they have their >> own bindings), the SWIG interface file and typemaps contain a lot of Perl >> specific things and I currently don't know how to translate them to their >> Python equivalentes. >> >> I hope to get help with this problem during the SBML hackathon end of >> march. >> >> =;) xtof >> >> -- >> Christoph Flamm >> Institut fuer Theoretische Chemie | email: xt...@tb... >> Universitaet Wien | phone: ++43-1-4277-527-39 >> Waehringerstrasse 17/3/308 | fax: ++43-1-4277-527-93 >> A-1090 Wien, Austria | www: http://www.tbi.univie.ac.at/~xtof >> >> Michele Mattioni writes: >> > Hello list, >> > >> > I would like to know if it's possible to have a python binding for >> > OdeSolver and an example code how to run a timecourse of a model. >> > >> > In particular what I would like to do is: >> > >> > run a model for x time >> > get the species value >> > change one specie value >> > carry on the simulation with the new value for that specie and the >> > last calculated value for all the others. >> > >> > Is possible to do something like that with odeSolver using some python >> > binding? >> > >> > Thanks, >> > Michele. >> > > ------------------------------------------------------------------------------ > Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) > software. With Adobe AIR, Ajax developers can use existing skills and code to > build responsive, highly engaging applications that combine the power of local > resources and data with the reach of the web. Download the Adobe AIR SDK and > Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com > _______________________________________________ > sbmlsolver-discuss mailing list > sbm...@li... > https://lists.sourceforge.net/lists/listinfo/sbmlsolver-discuss > -- Dr Colin Gillespie http://www.mas.ncl.ac.uk/~ncsg3/ |