From: Adrian F. <fe...@ma...> - 2002-08-02 19:06:54
|
Probably Conrad is the best person to answer this question, but I'll try. You can insert the formula integra(col("A"),col("F")) in a cell, it will be calculated automatically. But of course, you need to have the module "integra" imported. You can set which packages sg should import at runtime by default using the python configuration tool, or you can do it by hand from the terminal. Once you change one of the columns, you can go to the cell where the formula is, press enter, and the result will be updated. Of course, you approach is valid as well. Hope this helps. Saludos! <ADRIAN> On Fri, 2 Aug 2002, Alfonso Alba [iso-8859-1] Garc=EDa wrote: > hi everybody, >=20 > a simple one, is it possible to link somehow a python script to a cell? = I=20 > will explain: I have two columns and I want to calculate the integral, I= =20 > wrote a small function in python that does this. What i want is to put th= e=20 > number in a cell...that is easy from the python terminal: >=20 > set_cell("G",0, integra(col("A"),col("F"))) >=20 > where integra is my function. Now, what i would like is the following: if= I=20 > change column A, I want to go to the cell, press enter and let python=20 > calculate the new integral, or something similar to the plug-in "set colu= mn=20 > values", that calculates the integral when the file is open. How can i do= =20 > this? >=20 > I thought to do the following sort of plug-in: > 1- select a cell > 2- right-click and select the plug-in > 3- It will ask you which columns to integrate > 4- it calculates the integral and stores it in the selected cell >=20 > so if i change column A, i have to go to the cell and run the plug-in aga= in.=20 > Is this the proper way to proceed or is there a better way? >=20 > Thanks a lot, >=20 > Alfonso >=20 >=20 > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Scigraphica-devel mailing list > Sci...@li... > https://lists.sourceforge.net/lists/listinfo/scigraphica-devel >=20 |