{"id":17633,"date":"2016-09-02T20:17:42","date_gmt":"2016-09-02T20:17:42","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=17633"},"modified":"2016-09-02T20:17:42","modified_gmt":"2016-09-02T20:17:42","slug":"web-programming-python-finding-server-version","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/web-programming-python-finding-server-version\/","title":{"rendered":"Web programming:  Python:  finding server version"},"content":{"rendered":"<h1>The tutor tells how to determine the version of Python the server is using.<\/h1>\n<p>I&#8217;ve found two ways to print out the version of Python used by the remote server:<br \/>\n<span style=\"font-family:monospace\"><br \/>\nimport platform<br \/>\nprint &#8220;Content-type:  text\/html\\n\\n&#8221;<br \/>\nprint(platform.python_version())<br \/>\n<\/span><\/p>\n<p>or else<br \/>\n<span style=\"font-family:monospace\"><br \/>\nimport sys<br \/>\nprint &#8220;Content-type:  text\/html\\n\\n&#8221;<br \/>\nprint(sys.version)<br \/>\n<\/span><\/p>\n<p>HTH:)<\/p>\n<p>Source:<\/p>\n<p><a href=\"https:\/\/docs.python.org\/2\/library\/platform.html\">docs.python.org\/2<\/a><\/p>\n<p><a href=\"https:\/\/docs.python.org\/2\/library\/sys.html\">docs.python.org\/2<\/a><\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/1252163\/printing-python-version-in-output\">stackoverflow.com<\/a><\/p>\n<p>Jack of <a href=\"https:\/\/www.oracletutoring.ca\">Oracle Tutoring by Jack and Diane,<\/a> Campbell River, BC.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The tutor tells how to determine the version of Python the server is using. I&#8217;ve found two ways to print out the version of Python used by the remote server: import platform print &#8220;Content-type: text\/html\\n\\n&#8221; print(platform.python_version()) or else import sys &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/web-programming-python-finding-server-version\/\"> <span class=\"screen-reader-text\">Web programming:  Python:  finding server version<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[105,1856,1855],"tags":[1857,1860,1859,1858],"class_list":["post-17633","post","type-post","status-publish","format-standard","hentry","category-computer-science","category-python","category-web-programming","tag-finding-version-of-python-on-server","tag-how-to-find-version-of-python-on-server","tag-plaform-python_version","tag-sys-version"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/17633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/comments?post=17633"}],"version-history":[{"count":8,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/17633\/revisions"}],"predecessor-version":[{"id":17641,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/17633\/revisions\/17641"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=17633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=17633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=17633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}