]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Added global 'version' variable.
authorGuido van Rossum <guido@python.org>
Tue, 10 Dec 1991 13:54:12 +0000 (13:54 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 10 Dec 1991 13:54:12 +0000 (13:54 +0000)
Print version and copyright when called interactively.

Modules/config.c.in

index 103ee82fed12864f553dfc189447c5f846738602..4f432416b34cd90e730b5ee3c2a5a3abe0bccfe5 100644 (file)
@@ -24,6 +24,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 /* Configurable Python configuration file */
 
+char version[] = "0.9.3 beta (2)";
+
 #include <stdio.h>
 
 #ifdef USE_STDWIN
@@ -39,6 +41,11 @@ initargs(p_argc, p_argv)
 #ifdef USE_STDWIN
        wargs(p_argc, p_argv);
 #endif
+       if (*p_argc < 2 && isatty(0) && isatty(1))
+       {
+               printf("Python %s.\n", version);
+               printf("Copyright 1990, 1991 Stichting Mathematisch Centrum, Amsterdam\n");
+       }
 }
 
 void