writerfilter: convert qnametostr to Python

Change-Id: Ie72afbb1a7d384386d3189dae8276444767aac53