{"id":11421,"date":"2015-07-15T07:44:08","date_gmt":"2015-07-15T07:44:08","guid":{"rendered":"http:\/\/www.oracletutoring.ca\/blog\/?p=11421"},"modified":"2015-07-15T07:44:08","modified_gmt":"2015-07-15T07:44:08","slug":"python-a-test-script","status":"publish","type":"post","link":"https:\/\/www.oracletutoring.ca\/blog\/python-a-test-script\/","title":{"rendered":"Python:  a test script"},"content":{"rendered":"<h1>The tutor offers a quick way to test the Python installation.<\/h1>\n<p>If you&#8217;re running Linux, I&#8217;d guess Python is on-board.  With Windows, Python likely needs to be installed.  In either case, to test it, you can write a test script, then attempt to run it.<\/p>\n<p>In a text editor (<em>Notepad<\/em> in Windows, or perhaps <em>gedit<\/em> in Linux), this one-line script could be written:<\/p>\n<p><span style=\"font-family:monospace;color:brown\">print(&#8220;Hello.  This is a test.&#8221;)<\/span><\/p>\n<p>Let&#8217;s imagine the file is saved as <span style=\"font-family:monospace\">test.py<\/span>; now you&#8217;d like to try running it.  Here&#8217;s how, from the command line:<\/p>\n<p><span style=\"font-family:monospace\">python test.py <span style=\"color:orange\">&nbsp;&nbsp;&nbsp;(Linux)<\/span><\/span><\/p>\n<p><span style=\"font-family:monospace\">test.py<span style=\"color:orange\">&nbsp;&nbsp;&nbsp;(Windows)<\/span><\/span><\/p>\n<p>If the script works, you&#8217;ll hopefully see the greeting<\/p>\n<p><span style=\"font-family:monospace\">Hello.  This is a test.<\/span><\/p>\n<p>I hope it works:)<\/p>\n<p>Source:<\/p>\n<p>Donaldson, Toby.  <u>Python.<\/u> Peachpit Press, 2014.<\/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 offers a quick way to test the Python installation. If you&#8217;re running Linux, I&#8217;d guess Python is on-board. With Windows, Python likely needs to be installed. In either case, to test it, you can write a test script, &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.oracletutoring.ca\/blog\/python-a-test-script\/\"> <span class=\"screen-reader-text\">Python:  a test script<\/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],"tags":[930,931],"class_list":["post-11421","post","type-post","status-publish","format-standard","hentry","category-computer-science","tag-python","tag-python-test-script"],"_links":{"self":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/11421","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=11421"}],"version-history":[{"count":16,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/11421\/revisions"}],"predecessor-version":[{"id":11437,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/posts\/11421\/revisions\/11437"}],"wp:attachment":[{"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/media?parent=11421"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/categories?post=11421"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oracletutoring.ca\/blog\/wp-json\/wp\/v2\/tags?post=11421"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}