I've probably asked this before, but how can I tell within the program I'm
running if the .py files was involved by "run module" in IDLE or by using
the .py assoication with the python.exe program? I'd like to prevent running
under certain circumstances, or pop-up warnings, or change character
disp
I use quick-and-dirty code like this:
# Get source directory and text file
Root = Tkinter.Tk()
Root.title(programname)
srcdir = tkFileDialog.ask
Poi-fect - thanks!
import sys
if sys.modules.has_key("idlelib"):
print "Running under idle"
else:
print "Not running under idle"
- Robert
"Michael Hoffman" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Robert D. Young wrote:
&