texrunner provides a (hopefully) convenient interface to Tex including functions for running Tex, parsing log files.
The online module allows retrieving results of commands, such as
dimensions of an hbox, using Tex's interactive features.
This package is a work in progress and likely contains lots of bugs. Eventually I hope it will be good enough for general use but for now it's only suitable for simple things.