Re: [Tutor] How to get module name from ImportError

2011-11-21 Thread Steven D'Aprano
nikunj.badja...@emc.com wrote: Hi All, Please look at the following snippet. {{{ # User defined modules try: from scripts import precheck from scripts import validate from scripts import constants except ImportError: print("ERROR: One of the modules (..scripts/precheck.py, valid

Re: [Tutor] How to get module name from ImportError

2011-11-20 Thread Dave Angel
at the value is *not* a string, but is an object of some subclass of ImportError. From: Christian Witts [mailto:cwi...@compuscan.co.za] Sent: Monday, November 21, 2011 11:36 AM To: Badjatya, Nikunj Cc: tutor@python.org Subject: Re: [Tutor] How to get module name from ImportError On 2011

Re: [Tutor] How to get module name from ImportError

2011-11-20 Thread Nikunj.Badjatya
Exactly ! Thanks a lot. From: Christian Witts [mailto:cwi...@compuscan.co.za] Sent: Monday, November 21, 2011 11:36 AM To: Badjatya, Nikunj Cc: tutor@python.org Subject: Re: [Tutor] How to get module name from ImportError On 2011/11/21 07:54 AM, nikunj.badja...@emc.com<mailto:nikunj.ba

Re: [Tutor] How to get module name from ImportError

2011-11-20 Thread Christian Witts
On 2011/11/21 07:54 AM, nikunj.badja...@emc.com wrote: Hi All, Please look at the following snippet. {{{ # User defined modules try: from scripts import precheck from scripts import validate from scripts import constants except ImportError: print("ERROR: One of the modul

[Tutor] How to get module name from ImportError

2011-11-20 Thread Nikunj.Badjatya
Hi All, Please look at the following snippet. {{{ # User defined modules try: from scripts import precheck from scripts import validate from scripts import constants except ImportError: print("ERROR: One of the modules (..scripts/precheck.py, validate.py, constants) is not presen