Conversions from Python string to SbName and SbString are done automatically, for instance:
myOffScreenRenderer = SoOffscreenRender(myViewportRegion) if not myOffScreenRenderer.writeToFile('test.png', 'PNG'): print 'writeToFile failed'