0
Powershell --> Python : Object Members
I completely understand that these are two very different scripting world's, however maybe there's a module out there that can help me. in powershell you are able to "pipe" the details of an object with get-member command and receive all properties and methods possible against that object. Does python have this capability?â
1 Answer
+ 1
# you can use dir() on any object to get methods and properties, Is that what #you want ?
class myObject:
myClassProp = 'fred'
def __init__(self):
self.name = 'ric'
self.age ='old'
def mymethod(self):
pass
def myOtherMethod(self):
pass
anInstance = myObject()
for item in dir(anInstance):
print(item)