in reply to Dual personality: Module and script
You could also check the value of $0. If your module is executed rather than imported, it will return the name of the module. Otherwise it will return the name of the script that imported it.
Brad
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Dual personality: Module and script
by Anonymous Monk on Aug 03, 2004 at 15:55 UTC | |
by Aristotle (Chancellor) on Aug 03, 2004 at 16:13 UTC | |
by Anonymous Monk on Aug 03, 2004 at 16:23 UTC | |
by ysth (Canon) on Aug 03, 2004 at 19:28 UTC | |
by bgreenlee (Friar) on Aug 04, 2004 at 11:23 UTC | |
by Anonymous Monk on Aug 04, 2004 at 14:27 UTC |