mirror of
https://github.com/python/cpython.git
synced 2025-11-02 19:12:55 +00:00
Added global 'version' variable.
Print version and copyright when called interactively.
This commit is contained in:
parent
c5e96291d0
commit
9f462af3af
1 changed files with 7 additions and 0 deletions
|
|
@ -24,6 +24,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
/* Configurable Python configuration file */
|
/* Configurable Python configuration file */
|
||||||
|
|
||||||
|
char version[] = "0.9.3 beta (2)";
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#ifdef USE_STDWIN
|
#ifdef USE_STDWIN
|
||||||
|
|
@ -39,6 +41,11 @@ initargs(p_argc, p_argv)
|
||||||
#ifdef USE_STDWIN
|
#ifdef USE_STDWIN
|
||||||
wargs(p_argc, p_argv);
|
wargs(p_argc, p_argv);
|
||||||
#endif
|
#endif
|
||||||
|
if (*p_argc < 2 && isatty(0) && isatty(1))
|
||||||
|
{
|
||||||
|
printf("Python %s.\n", version);
|
||||||
|
printf("Copyright 1990, 1991 Stichting Mathematisch Centrum, Amsterdam\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue