IP2.0.0.1000
from System import Type, Activator
wb = Activator.CreateInstance(Type.GetTypeFromProgID("WScript.Shell"))
print dir(wb)
print wb.CurrentDirectory()
print wb.SpecialFolders("Desktop")
print dir(wb)The first dir of wb is missing a method which appears as soon as a call is made to it. Interestingly CurrentDirectory is listed in the first dir without being called. ['CreateObjRef', 'CurrentDirectory', 'Equals', 'Exec', 'Finalize', 'GetAttrNames ', 'GetHashCode', 'GetLifetimeService', 'GetMemberNames', 'GetType', 'Initialize LifetimeService', 'MemberwiseClone', 'ReferenceEquals', 'ToString', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__init__', '__new__' , '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__'] c:\code\comtry c:\users\daftspaniel\desktop ['CreateObjRef', 'CurrentDirectory', 'Equals', 'Exec', 'Finalize', 'GetAttrNames ', 'GetHashCode', 'GetLifetimeService', 'GetMemberNames', 'GetType', 'Initialize LifetimeService', 'MemberwiseClone', 'ReferenceEquals', '*SpecialFolders*', 'ToStr ing', '__class__', '__delattr__', '__doc__', '__getattribute__', '__hash__', '__ init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '_ _str__'] Thanks, Davy Mitchell -- Davy Mitchell Blog - http://www.latedecember.co.uk/sites/personal/davy/ Twitter - http://twitter.com/daftspaniel Skype - daftspaniel http://needgod.com
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
