win32com question
Uwe Schmitt
uwe.schmitt at procoders.net
Fri Dec 13 03:27:11 EST 2002
Syver Enstad <syver-en+usenet at online.no> wrote:
> 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.
>
Thats how I did it. I just asked if I can do this automatically
inside my server code.
Greetings Uwe
--
Dr. rer. nat. Uwe Schmitt Computer science is no more about Computers,
uwe.schmitt at num.uni-sb.de than astronomy is about telescopes. (Dijkstra)
http://www.procoders.net
More information about the Python-list
mailing list