Guido van Rossum | 582646a | 1996-05-28 22:30:17 +0000 | [diff] [blame] | 1 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 2 | /* Return the full version string. */ |
| 3 | |
Guido van Rossum | 020dfe7 | 1995-09-18 21:40:19 +0000 | [diff] [blame] | 4 | #include "Python.h" |
| 5 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 6 | #include "patchlevel.h" |
| 7 | |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 8 | const char * |
Thomas Wouters | f70ef4f | 2000-07-22 18:47:25 +0000 | [diff] [blame] | 9 | Py_GetVersion(void) |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 10 | { |
Serhiy Storchaka | 598ceae | 2017-11-28 17:56:10 +0200 | [diff] [blame] | 11 | static char version[250]; |
| 12 | PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", |
| 13 | PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); |
| 14 | return version; |
Guido van Rossum | 667d704 | 1995-08-04 04:20:48 +0000 | [diff] [blame] | 15 | } |