Power system modelling and scripting is a quite general and ambitious title. Of course, to embrace all existing aspects of power system modelling would lead to an encyclopedia and would be likely an impossible task. Thus, the book focuses on a subset of power system models based on the following assumptions: (i) devices are modelled as a set of nonlinear differential algebraic equations, (ii) all alternate-current devices are operating in three-phase balanced fundamental frequency, and (iii) the time frame of the dynamics of interest ranges from tenths to tens of seconds. These assumptions basically restrict the analysis to transient stability phenomena and generator controls. The modelling step is not self-sufficient. Mathematical models have to be translated into computerprogramming code in order to be analyzed, understood and experienced. It is an object of the book to provide a general framework for a power system analysis software tool and hints for filling up this framework with versatile programming code.This book is for all students and researchers that are looking for a quick reference on power system models or need some guidelines for starting the challenging adventure of writing their own code.