A much easier way to solve this in Python, and get rid of all the related factory classes, is to use import statements:
In widget.py, you'd have something like this (I'm making it up):
if sys.platform == 'linux'
from gtk import GtkTextBox as TextBox
elif sys.platform == 'win32'
from winforms import TextBox as TextBox
Then in your GUI code you would just have this:
from widgets import TextBox
...
def buildForm():
textbox = TextBox()
Of course, you might need an extra adapter layer to give them the same interface, but it's not hard.