Difference between revisions of "PyTest"

From CoolWiki
Jump to navigationJump to search
 
Line 13: Line 13:
 
* Look for 'spyder2' executable.
 
* Look for 'spyder2' executable.
 
* Double click on spyder2.
 
* Double click on spyder2.
* You should have something like what I show below in the Figure.
+
* You should have something like what I show below in the Figure.  It won't be exactly the same, but should resemble it.
 
* Find the window pane with the title 'python' and a command-line prompt '>>>'.  Its in the bottom right in my Figure below.
 
* Find the window pane with the title 'python' and a command-line prompt '>>>'.  Its in the bottom right in my Figure below.
 
* Type the following lines verbatim (hit return after each):
 
* Type the following lines verbatim (hit return after each):
 
:<nowiki>2+2</nowiki>
 
:<nowiki>2+2</nowiki>
 
:<nowiki>import numpy as np</nowiki>
 
:<nowiki>import numpy as np</nowiki>
 
+
* The answer you should get for the first line is '4', and
 +
* The answer you should get for the 2nd line is that python thinks for a second or two, then returns the prompt without comment.
 +
* If you get this far, you are set to go.
  
 
{| cellpadding="1"
 
{| cellpadding="1"

Latest revision as of 21:11, 16 May 2014

Is my python ready?

This page will attempt to answer the question, 'Now What?' after you have gone through and installed python.

Find python on your system

When you installed the distribution, you identified a local installation directory for it.

  • Open your navigator, file explorer, or whatever the local file browser is called on your system. On Macs, this is usually 'Finder'.
  • Navigate to the installation folder (directory).
  • Look for a folder called 'bin'.
  • Go inside 'bin' and
  • Look for 'spyder2' executable.
  • Double click on spyder2.
  • You should have something like what I show below in the Figure. It won't be exactly the same, but should resemble it.
  • Find the window pane with the title 'python' and a command-line prompt '>>>'. Its in the bottom right in my Figure below.
  • Type the following lines verbatim (hit return after each):
2+2
import numpy as np
  • The answer you should get for the first line is '4', and
  • The answer you should get for the 2nd line is that python thinks for a second or two, then returns the prompt without comment.
  • If you get this far, you are set to go.
Spyder2.jpg Screenshot of spyder2