Hi, Sorry that this is really a Python-specific problem, but I'm running Python 2.1.2, and for the following stub: import mutex lock = mutex() I get the following interpreter error: TypeError: object of type 'module' is not callable This IS extremely basic, but can someone tell me what is so special about this class??? I've even trolled the entire Python source code base, and there is nowhere that this module is used for me to see how to constuct an instance. Cheers, Alan _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
Am 07.04.2002, 00:39 Uhr schrub alan milligan <alan_milligan@hotmail.com>:
import mutex lock = mutex()
I get the following interpreter error:
TypeError: object of type 'module' is not callable
This IS extremely basic, but can someone tell me what is so special about this class???
Nothing, you just got the call wrong, as the error message you cited explains. You're calling the module (which isn't callable) instead of the class within the module. Try "lock = mutex.mutex()" instead. Jo. -- Internetmanufaktur Jo Meder ---------------------- Berlin, Germany http://www.meder.de/ ------------------- fon: ++49-30-417 17 63 33 Kollwitzstr. 75 ------------------------ fax: ++49-30-417 17 63 45 10435 Berlin --------------------------- mob: ++49-170- 2 98 89 97 Public GnuPG-Key ---------- http://www.meder.de/keys/jo-pubkey.txt
try: from mutex import mutex which will give you the mutex class of the mutex module. hth, Casey alan milligan wrote:
Hi,
Sorry that this is really a Python-specific problem, but I'm running Python 2.1.2, and for the following stub:
import mutex lock = mutex()
I get the following interpreter error:
TypeError: object of type 'module' is not callable
This IS extremely basic, but can someone tell me what is so special about this class???
I've even trolled the entire Python source code base, and there is nowhere that this module is used for me to see how to constuct an instance.
Cheers, Alan
_________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (3)
-
alan milligan -
Casey Duncan -
Jo Meder