Hi,
this is more of a pure python question i want to throw here.
Im developing a PySide Application that is used as the
context/task/app/openfile launcher by the artists.

The artist makes some choices that drive him towards different dialogs and
widgets. The thing is, due to a request, im facing the need to dynamically
change the sys path and reload all the modules from a different location
inside the same main QApplication.

The reason for this is that, once an artist makes a specific choice, all
the following widgets... and code that is executed should be loaded from
another location different than the current app. But, should look as if it
were still part of the same app, the widgets need to appear embedded.

Ive managed to change the sys.path of the original folder to the folder i
want and successfully loaded all the modules from the new path, but then im
starting to get some strange behavior:

QtCore.QObject.__init__(self)
AttributeError: 'NoneType' object has no attribute 'QObject'

(Even if performed the from PySide2 import QtCore)

I understand what im trying to achieve is not very orthodox, i was
wondering if its even possible!

I would like to avoid obvious ways of separating it in two QApplications
and closing one when the other is opened for example.

Has any of you ever tried to do something like this?
What concerns should i be aware of when doing it?

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CANOg8wWN-Gwzz-drk79z3C_CMxvLqC_iyCRzRbcH%2BZoAsXMJRw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to