diff --git a/twander.py b/twander.py index a9de5b8..b2bf0df 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ # For Updates See: http://www.tundraware.com/Software/twander PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.66 2003/01/17 20:58:49 tundra Exp $" +RCSID = "$Id: twander.py,v 2.67 2003/01/17 21:37:22 tundra Exp $" VERSION = RCSID.split()[2] @@ -172,6 +172,7 @@ DEBUGLEVEL = 0 # No debug output NODETAILS = FALSE # TRUE means details can never be displayed NONAVIGATE = FALSE # TRUE means that all directory navigation is prevented +USETHREADS = TRUE # Use threads on Unix WARN = TRUE # Warnings on ##### @@ -1745,6 +1746,8 @@ if dir: LoadDirList(dir) + # Inhibit further processing of key - some Function Keys + # have default behavior in Tk which we want to suppress. return "break" # End of 'FuncKeypress()' @@ -1810,7 +1813,10 @@ # Normal command execution for both Unix and Win32 else: try: - thread.start_new_thread(os.system, (newcmd,)) + if (OSNAME == 'posix') and not USETHREADS: + os.system(newcmd) + else: + thread.start_new_thread(os.system, (newcmd,)) except: WrnMsg(wBADEXE % newcmd) @@ -2595,7 +2601,8 @@ # Options (and their default values) which can be set in the configuration file -UI.OptionsBoolean = {"AUTOREFRESH":AUTOREFRESH, "NODETAILS":NODETAILS, "NONAVIGATE":NONAVIGATE, "WARN":WARN} +UI.OptionsBoolean = {"AUTOREFRESH":AUTOREFRESH, "NODETAILS":NODETAILS, "NONAVIGATE":NONAVIGATE, + "USETHREADS":USETHREADS, "WARN":WARN} UI.OptionsNumeric = {"DEBUGLEVEL":DEBUGLEVEL, "FSZ":FSZ, "HEIGHT":HEIGHT, "MAXDIR":MAXDIR, "MAXHIST":MAXHIST, "MAXNESTING":MAXNESTING, "REFRESHINT":REFRESHINT, "WIDTH":WIDTH}