Added global 'version' variable.

Print version and copyright when called interactively.
This commit is contained in:
Guido van Rossum 1991-12-10 13:54:12 +00:00
parent c5e96291d0
commit 9f462af3af
1 changed files with 7 additions and 0 deletions

View 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