Support for frozen scripts; added -i option.
diff --git a/Python/pythonmain.c b/Python/pythonmain.c
index 1718611..760e5da 100644
--- a/Python/pythonmain.c
+++ b/Python/pythonmain.c
@@ -34,6 +34,8 @@
 extern char *optarg;
 extern int getopt PROTO((int, char **, char *));
 
+extern char *getenv();
+
 main(argc, argv)
 	int argc;
 	char **argv;
@@ -43,10 +45,17 @@
 	char *command = NULL;
 	char *filename = NULL;
 	FILE *fp = stdin;
+	char *p;
+	int inspect = 0;
+
+	if ((p = getenv("PYTHONDEBUG")) && *p != '\0')
+		debugging = 1;
+	if ((p = getenv("PYTHONVERBOSE")) && *p != '\0')
+		verbose = 1;
 	
 	initargs(&argc, &argv); /* Defined in config*.c */
 
-	while ((c = getopt(argc, argv, "c:dv")) != EOF) {
+	while ((c = getopt(argc, argv, "c:div")) != EOF) {
 		if (c == 'c') {
 			/* -c is the last option; following arguments
 			   that look like options are left for the
@@ -64,6 +73,10 @@
 			debugging++;
 			break;
 
+		case 'i':
+			inspect++;
+			break;
+
 		case 'v':
 			verbose++;
 			break;
@@ -118,6 +131,10 @@
 		sts = run(fp, filename == NULL ? "<stdin>" : filename) != 0;
 	}
 
+	if (inspect && isatty((int)fileno(stdin)) &&
+	    (filename != NULL || command != NULL))
+		sts = run(stdin, "<stdin>") != 0;
+
 	goaway(sts);
 	/*NOTREACHED*/
 }