From 9f462af3afe48163e1228998ed6a73d6c329208d Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 10 Dec 1991 13:54:12 +0000 Subject: [PATCH] Added global 'version' variable. Print version and copyright when called interactively. --- Modules/config.c.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Modules/config.c.in b/Modules/config.c.in index 103ee82fed1..4f432416b34 100644 --- a/Modules/config.c.in +++ b/Modules/config.c.in @@ -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 #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