PythonBasics: Difference between revisions

From CASA Guides
Jump to navigationJump to search
Aleroy (talk | contribs)
No edit summary
Aleroy (talk | contribs)
No edit summary
Line 12: Line 12:


== Data Collections: Lists ==
== Data Collections: Lists ==
Lists are one of the fundamental data collections in python (we will also discuss dictionaries and you may want to read about tuples and sets).


== Data Collections: Dictionaries ==
== Data Collections: Dictionaries ==
Dictionaries are another basic python data collection. Dictionaries store data in pairs, with a set of unique '''keys''' each mapped to some '''value''' (the values do not have to be unique). Dictionaries are ''extremely'' useful in scripting. For example, imagine that we are reducing a complex set of observations and want to be able to look up a the calibrator associated with a given source.


== Control Flow ==
== Control Flow ==

Revision as of 01:28, 10 October 2011

Simple Variables

Basic Math

Ints and Floats

Booleans

Deleting Variables

Checking Whether a Variable Exists

Data Collections: Lists

Lists are one of the fundamental data collections in python (we will also discuss dictionaries and you may want to read about tuples and sets).

Data Collections: Dictionaries

Dictionaries are another basic python data collection. Dictionaries store data in pairs, with a set of unique keys each mapped to some value (the values do not have to be unique). Dictionaries are extremely useful in scripting. For example, imagine that we are reducing a complex set of observations and want to be able to look up a the calibrator associated with a given source.

Control Flow

If

While

For

Break/Continue

More Complex Programs

Executing Scripts

Functions

Modules

Object Oriented Aspects

Tips and Tricks

Pasting Code

Getting Help, Exploring Objects

Things That Work Only in the Shell