How config gfx with txt file?

from panda3d.core import loadPrcFileData
loadPrcFileData("", "load-display pandadx9")

This should be called before a window is opened (also before any DirectStart import).