win32com question
Syver Enstad
syver-en+usenet at online.no
Thu Dec 12 10:03:34 EST 2002
Uwe Schmitt <uwe.schmitt at procoders.net> writes:
> Hi,
>
> I'm writing some code which should be available for import and as
> a com object. Now I want to distinguish if the script is run as
> com server or via import. Are there any flags/... available for this
> ?
The not wanting to see the problem solution to this:
class A:
def setRunningUnderNormalImport(self):
self._isRunningUnderNormalImport = True
when importing and using A under normal import, call the method
above. Write the class so that it checks the flag and changes its
behaviour accordingly.
--
Vennlig hilsen
Syver Enstad
More information about the Python-list
mailing list