getversion.c 308 Bytes
Newer Older
1

Guido van Rossum's avatar
Guido van Rossum committed
2 3
/* Return the full version string. */

Guido van Rossum's avatar
Guido van Rossum committed
4 5
#include "Python.h"

Guido van Rossum's avatar
Guido van Rossum committed
6 7 8
#include "patchlevel.h"

const char *
9
Py_GetVersion(void)
Guido van Rossum's avatar
Guido van Rossum committed
10
{
11 12 13 14
    static char version[250];
    PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s",
                  PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
    return version;
Guido van Rossum's avatar
Guido van Rossum committed
15
}