On Wednesday 03 May 2006 12:07, Cyril Giraudon wrote: > Hello, > > I actually try to write a tclspice like tool in python > (pyrex, numpy modules).
How about doing it for gnucap? Lots of people have written front-ends and wrappers for Spice. Gnucap really needs something like that, and to provide the functionality of "nutmeg". > The module call directly spicelib or frontend functions. > > I 'd like to give an object oriented approach to the module, > so I need to clean the memory when a circuit is not used any > more (garbage collector). > > I use the com_removecirc() function for that purpose but the > circuit is still > in ft_circuits list and a "run" causes a segmentation fault. > > Is there a function removing entirely a circuit from the > memory (database and circuits list) ? Spice: no (to all). Spice is designed to load a circuit once, then make only non-structural changes. For a serious topology change, you need to start over. Gnucap: yes (to all). It is designed so you can make arbitrary changes to the circuit. It can even make some topology changes dynamically as the simulation runs. > More over, it seems that the model name in a .cir file can't > contain ('/', '+', '-'). > What are the rules for models name ? I think it is letters, numbers, and underscore. Mostly not case sensitive. Actually, the rule is that it is not case sensitive, but there are occasional surprises, like the FAT file system. Model names are supposed to start with a letter, but there are occasions where this is not enforced.