blob: 7bd6efd0a0154700113ba39a6c0fd820e82bfbd3 [file] [log] [blame]
Guido van Rossum582646a1996-05-28 22:30:17 +00001
Guido van Rossum667d7041995-08-04 04:20:48 +00002/* Return the full version string. */
3
Guido van Rossum020dfe71995-09-18 21:40:19 +00004#include "Python.h"
5
Guido van Rossum667d7041995-08-04 04:20:48 +00006#include "patchlevel.h"
7
Guido van Rossum667d7041995-08-04 04:20:48 +00008const char *
Thomas Woutersf70ef4f2000-07-22 18:47:25 +00009Py_GetVersion(void)
Guido van Rossum667d7041995-08-04 04:20:48 +000010{
Guido van Rossumeda232f1999-04-22 12:03:40 +000011 static char version[250];
Georg Brandle87c0e12010-07-31 19:29:15 +000012 PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s",
Jeremy Hylton518ab1c2001-11-28 20:42:20 +000013 PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
Guido van Rossum667d7041995-08-04 04:20:48 +000014 return version;
15}