You can't do the approach you are suggesting, because the Maya commands API doesn't have a concept of a "Window" instance that it can return to you. When you write a command plugin you are defining a Maya commands-style call, which can take some parameters, do some work, and then return values that are supported through the setResult() methods. Instances of custom python classes are not one of those things you would be returning. What should a MEL user expect to get back in the results? What would a C++ user get back?
If you look at how the rest of the Maya commands work, you will see they deal in terms of string paths to objects, and accepting those in other functions to perform edit or create operations.