forked from turnkeylinux/pythondialog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DEBUGGING
23 lines (17 loc) · 1017 Bytes
/
DEBUGGING
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# The following lines are useful for debugging: they write the
# full command (with arguments quoted and environment
# variables set) to a file named "command.debug" in the
# current directory. See Dialog.__call_program() in dialog.py.
import commands
envvar_settings_list = []
if new_environ.has_key("DIALOGRC"):
envvar_settings_list.append(
"DIALOGRC='%s'" % new_environ["DIALOGRC"])
for var in _dialog_exit_status_vars.keys():
varname = "DIALOG_" + var
envvar_settings_list.append(
"%s=%s" % (varname, new_environ[varname]))
envvar_settings = string.join(envvar_settings_list, " ")
file("command.debug", "wb").write(
envvar_settings +
string.join(map(commands.mkarg, arglist), ""))