Very simple Python: Difference between revisions

From AstroEdWiki
Jump to navigation Jump to search
Line 3: Line 3:
Python is open source software availble for free from [http://www.python.org/ www.python.org]. Version 2.7 is the current mature version that is widely supportly by other add-on modules, and is the one for which examples here are written. Python 3 is still under development and it currently lacks packages that are necessary for astronomy.   
Python is open source software availble for free from [http://www.python.org/ www.python.org]. Version 2.7 is the current mature version that is widely supportly by other add-on modules, and is the one for which examples here are written. Python 3 is still under development and it currently lacks packages that are necessary for astronomy.   


Install version 2.7 using the method that's appropriate for the operating system on your computer from this link:
 
If you have Linux, then mostly likely you already have Python and you can stop here.
 
For other operating systems, consider using the academic version from Enthought Solutions if you meet their licensing terms for the free version.  This version supplies Matplotlib, Numpy and Scipy which we will use. For more information about other options, see [http://python4astronomers.github.com/installation/python_install.html Python4Astronomers]
 
<center>
[http://www.enthought.com/products/edudownload.php Enthought Scientific Computing Solutions]
</center>
 
Alternatively, the source of Python development has versions for MacOS and Windows of the base system that avoids the commercial (though free) route of other vendors:


<center>
<center>
Line 9: Line 18:
</center>
</center>


*[http://www.python.org/download/windows Windows]
Additional modules would have to be installed separately later.
*[http://www.python.org/download/mac MacOS]
*Linux operating systems you will usually have Python already installed.  If modules are missing simply use the package installer from your distribution for most of them, or the command line "easy_install package_name" if it is not in the distribution archives.


== Using Python in real time ==
== Using Python in real time ==


== Using Python code as a standalone program ==
== Using Python code as a standalone program ==

Revision as of 04:52, 7 February 2013

Installing Python on your computer

Python is open source software availble for free from www.python.org. Version 2.7 is the current mature version that is widely supportly by other add-on modules, and is the one for which examples here are written. Python 3 is still under development and it currently lacks packages that are necessary for astronomy.


If you have Linux, then mostly likely you already have Python and you can stop here.

For other operating systems, consider using the academic version from Enthought Solutions if you meet their licensing terms for the free version. This version supplies Matplotlib, Numpy and Scipy which we will use. For more information about other options, see Python4Astronomers

Enthought Scientific Computing Solutions

Alternatively, the source of Python development has versions for MacOS and Windows of the base system that avoids the commercial (though free) route of other vendors:

www.python.org/download/

Additional modules would have to be installed separately later.

Using Python in real time

Using Python code as a standalone program