Replies: 2 comments
-
|
@msmftc, thanks for raising this. In general, the goal of |
Beta Was this translation helpful? Give feedback.
-
|
Note: this has been addressed in the 0.8.1 release |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
@mballance,
In my application I need some introspection on classes that are decorated with
@vsc.randoj. Given a reference to such a class, I need to determine the module that the class was defined in. The class property__module__typically has this information, but decorating the class changes__module__tovsc.rand_objBased on advice I found on the internet, I tried adding a
@functools.wrapsdecorator inside the functionvsc.randobj(), but that did not help. The only solution that I've found is to add a new line of code tovsc.randobj()that stores the original module name in a new property, as shown here:This lets me read the original module name, as shown in the example below, but I'd rather not use a hacked version of PyVSC. Do you know how I can read the original module using the current PyVSC code? If not, then can you think of a simple PyVSC change that would permit introspection of decorated classes?
In this example, the original module name is
__main__for bothHelloClassandSelector:Beta Was this translation helpful? Give feedback.
All reactions