mirror of https://github.com/python/cpython.git
Added global 'version' variable.
Print version and copyright when called interactively.
This commit is contained in:
parent
c5e96291d0
commit
9f462af3af
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue