http://code.google.com/p/phantomjs/issues/detail?id=115
Also implemented a new QPyFile class which is a wrapper over QFile, supporting context managers. It greatly improves code readability and reusability. http://code.google.com/p/phantomjs/issues/detail?id=47