building a circuit simulation software based on NGSpice using Python