Saturday, October 13, 2012

Installing Python

Here is a tip for when you install Python.  After you have googled python, gone to their website, downloaded the version you want, and launched the installer, you will get to a box that has a list of features to install.  At the bottom of the list it says "Add python.exe to path" and there is a red X in the box next to that choice.  Right-click on that choice, read the options on the drop-down box that appears, and check the box that says "install all features."  You do not want to leave that red X in that box.

You do want the installer to add python to your path variable.  If you do not have the installer add python to your path, you will have to do it yourself.  Here is how you test to see that your  path does have python in it:  Open a Windows command window and type PATH and hit a carriage return.  The OS will print the path and you can read it and look for "C:\Python33" or whatever version is latest.  Or, you can just test to see if the path variable is set properly by entering "python --version" and see if the command works.  The output will by "Python 3.3.0" or something similar if you get another version.

If you already know how to program, The Quick Python Book is a good introduction to the language.  My preference is to edit Python code with Notepad++ and use a command window for running code.  The Quick Python book acts like you will do all your work with the IDLE Python GUI.  I just use the IDLE tool to test small commands.

Python is a nice language.  I went back to look at PERL and I can see why people prefer Python to PERL.  PERL forces you to put funny symbols called sigils in front of variables.  I forgot about that.

Robert

No comments:

Post a Comment

Comments require my approval before they appear. Be patient. It will take a day or two for your comment to appear.