Proceedings of the 7 Python in Science Conference

Total Page:16

File Type:pdf, Size:1020Kb

Proceedings of the 7 Python in Science Conference Proceedings of the 7th Python in Science Conference SciPy Conference – Pasadena, CA, August 19-24, 2008. Editors: Gaël Varoquaux, Travis Vaught, Jarrod Millman Proceedings of the 7th Python in Science Conference (SciPy 2008) Contents Editorial 3 G. Varoquaux, T. Vaught, J. Millman The State of SciPy 5 J. Millman, T. Vaught Exploring Network Structure, Dynamics, and Function using NetworkX 11 A. Hagberg, D. Schult, P. Swart Interval Arithmetic: Python Implementation and Applications 16 S. Taschini Experiences Using SciPy for Computer Vision Research 22 D. Eads, E. Rosten The SciPy Documentation Project (Technical Overview) 27 S. Van der Walt Matplotlib Solves the Riddle of the Sphinx 29 M. Droettboom The SciPy Documentation Project 33 J. Harrington Pysynphot: A Python Re-Implementation of a Legacy App in Astronomy 36 V. Laidler, P. Greenfield, I. Busko, R. Jedrzejewski How the Large Synoptic Survey Telescope (LSST) is using Python 39 R. Lupton Realtime Astronomical Time-series Classification and Broadcast Pipeline 42 D. Starr, J. Bloom, J. Brewer Analysis and Visualization of Multi-Scale Astrophysical Simulations Using Python and NumPy 46 M. Turk Mayavi: Making 3D Data Visualization Reusable 51 P. Ramachandran, G. Varoquaux Finite Element Modeling of Contact and Impact Problems Using Python 57 R. Krauss Circuitscape: A Tool for Landscape Ecology 62 V. Shah, B. McRae Summarizing Complexity in High Dimensional Spaces 66 K. Young Converting Python Functions to Dynamically Compiled C 70 I. Schnell 1 unPython: Converting Python Numerical Programs into C 73 R. Garg, J. Amaral The content of the articles of the Proceedings of the Python in Science Conference is copyrighted and owned by their original authors. For republication or other use of the material published, please contact the copyright owners to obtain permis- sion. 2 Proceedings of the 7th Python in Science Conference (SciPy 2008) Editorial Gael Varoquaux ([email protected])– Neurospin, CEA Saclay , Bât 145, 91191 Gif-sur-Yvette France Travis Vaught ([email protected])– Enthought, Austin TX USA Jarrod Millman ([email protected])– University of California Berkeley, Berkeley CA USA The Annual Scipy Conference began in 2002 with a of note were the inroads that Python has gained in gathering of some extremely bright (and admittedly many other contexts, ranging from ecology and neu- odd and passionate) folks. They gathered at the Cal- roimaging, to mechanical engineering and computer tech campus in Pasadena, California to discover and vision. As presented at the conference, scientists are share ideas about a compelling approach to scientific attracted to Python by the quality and ease of use computing. These pioneers had been using Python, a of the language itself, and the richness of the exist- dynamic language, to perform and drive their model- ing scientific packages. Another major presence at the ing, data exploration and scientific workflows. At that conference this year was the more abstract-oriented time, Python already had the advantage of a very fast research fields of mathematics or graph theory. The numerics library as well as the flexibility of being in- SAGE project has been very successful at building terpreted, procedural (if you wanted it to be), and, upon Python to give a consistent package for num- in a true academic spirit, permissively open source. ber theory, or computational mathematics in general. That gathering 7 years ago yielded many interesting More component-oriented mathematical projects such ideas, but more importantly, it crystalized a commu- as NetworkX, for graph theory, or pyinterval, for inter- nity and established relationships that persist today. val arithmetic, contribute to the stack from a very dif- From those inauspicious beginnings, the conference has ferent perspective than the usual array-manipulating now grown to a fully international meeting attracting numerical packages. Finally, a sizable fraction of the a variety of interests—yet still inspired by the propo- talks where focused on the current effort to improve sition of a humane language interface to fast compu- the available tools. On the numerical side, the focus tation, data analysis and visualization. is on speed, with some research in compiling part or This year marked the 7th edition of the conference; all of the Python code to fast machine code. We also however, it is the first edition for which proceedings note a strong effort on the documentation of the tools, are to be published. We are thrilled by this new devel- where there has been a tremendous amount of work opment. These proceedings are the sign of a maturing toward filling a historical gap in user docs. community not only of developers, but also of scientific The SciPy Conference has been supported since its users. Python’s use as a tool for producing scientific creation by the Center for Advanced Computing Re- results is, by now, well established. Its status as the search, at CalTech, and Enthought Inc. In addition, subject of research and academic publication is now this year we were delighted to receive funding from being recognized and we hope that the proceedings the Python Software Foundation which allowed us to of the SciPy Conference will help communicate how pay for travel, conference fees and accommodation for scientists and engineers are using and building upon 10 students. We are very grateful to Leah Jones, of various Python tools to solve their problems. Commu- Enthought, and Julie Ponce, of the CACR (Caltech), nication is indeed paramount to both the software and for their invaluable help in organizing the conference. the scientific community. A scientist needs access to The conference, like much of the software presented, the methods of others; he also needs to get academic was truly a global effort and we are hopeful that the credit for his work, which is often measured in publi- impact will continue to grow. cations and citations. A developer needs to be aware of the ongoing software efforts to reduce duplication of effort; he also needs to advertise his work to potential users. Organizers The variety of subjects covered in the talks, and in the Organizing Committee following proceedings, is striking because is shows the extent of the use made of these tools in heterogeneous Conference Chairs communities. This is the power of open source projects and a key factor to their success. Different actors are • Jarrod Millman, UC Berkeley (USA) able to contribute to the quality of the tools in ways unique to their field and interests, resulting in a whole • Travis Vaught, Enthought (USA) stack that is much greater than the sum of its parts. Tutorial Coordinators Among the scientific results presented this year, there is a strong presence of the astronomy community—a • Fernando Pérez, UC Berkeley (USA) community that has a long history in software en- gineering and is an early adopter of Python. Also • Travis Oliphant, Enthought (USA) 3 G. Varoquaux, T. Vaught, J. Millman: Proc. SciPy 2008, G. Varoquaux, T. Vaught, J. Millman (Eds), pp. 3–5 Editorial Web Masters • Charles Harris, Space Dynamics Laboratory (USA) • Gaël Varoquaux, Neurospin, CEA - Saclay (France) • Ryan Krauss, Southern Illinois University Ed- wardsville (USA) • Stéfan van der Walt, University of Stellenbosch (South Africa) • Stéfan van der Walt, University of Stellenbosch (South Africa) Program Committee Proceedings Reviewers Program Chair • Matthew Brett, MRC Cognition and Brain Sciences • Gaël Varoquaux, Neurospin, CEA - Saclay (France) Unit (UK) Program Members • Ryan Krauss, Southern Illinois University Ed- wardsville (USA) • Anne Archibald, McGill University (Canada) • Jarrow Millman, UC Berkeley (USA) • Matthew Brett, MRC Cognition and Brain Sciences Unit (UK) • Gaël Varoquaux, Neurospin, CEA - Saclay (France) • Perry Greenfield, Space Telescope Science Institute • Stéfan van der Walt, University of Stellenbosch (USA) (South Africa) http://conference.scipy.org/proceedings/SciPy2008/paper_0 4 Proceedings of the 7th Python in Science Conference (SciPy 2008) The State of SciPy Jarrod Millman ([email protected])– University of California Berkeley, Berkeley, CA USA Travis Vaught ([email protected])– Enthought, Austin, TX USA The annual SciPy conference provides a unique op- freely distributable for both academic and commercial portunity to reflect on the state of scientific pro- use. It has a simple, expressive, and accessible syntax. gramming in Python. In this paper, we will look It does not impose a single programming paradigm back on where we have been, discuss where we are, on scientists but allows one to code at many levels and ask where we are going as a community. of sophistication, including Matlab style procedural Given the numerous people, projects, packages, and programming familiar to many scientists. Python is mailing lists that make up the growing SciPy commu- available in an easily installable form for almost ev- nity, it can be difficult to keep track of all the disparate ery software platform, including Windows, Macintosh, developments. In fact, the annual SciPy conference is Linux, Solaris, FreeBSD and many others. It is there- one of the few events that brings together the commu- fore well suited to a heterogeneous computing environ- nity in a concerted manner. So it is, perhaps, appro- ment. Python is also powerful enough to manage the priate that we begin the conference proceedings with complexity of large applications, supporting functional a paper titled “The State of SciPy”. Our hope is we programming, object-oriented programming, generic can help provide the context for the many interesting programming, and metaprogramming. In contrast, and more specific papers to follow. We also aim to commercial languages like Matlab and IDL, which also promote a much more detailed discussion of the state support a simple syntax, do not scale well to many of the project, community, and software stack, which complex programming tasks. Lastly, Python offers will continue throughout the year. strong support for parallel computing. Because it is The last year has seen a large number of exciting de- freely available, and installed by default on most Unix velopments in our community.
Recommended publications
  • Variable Precision in Modern Floating-Point Computing
    Variable precision in modern floating-point computing David H. Bailey Lawrence Berkeley Natlional Laboratory (retired) University of California, Davis, Department of Computer Science 1 / 33 August 13, 2018 Questions to examine in this talk I How can we ensure accuracy and reproducibility in floating-point computing? I What types of applications require more than 64-bit precision? I What types of applications require less than 32-bit precision? I What software support is required for variable precision? I How can one move efficiently between precision levels at the user level? 2 / 33 Commonly used formats for floating-point computing Formal Number of bits name Nickname Sign Exponent Mantissa Hidden Digits IEEE 16-bit “IEEE half” 1 5 10 1 3 (none) “ARM half” 1 5 10 1 3 (none) “bfloat16” 1 8 7 1 2 IEEE 32-bit “IEEE single” 1 7 24 1 7 IEEE 64-bit “IEEE double” 1 11 52 1 15 IEEE 80-bit “IEEE extended” 1 15 64 0 19 IEEE 128-bit “IEEE quad” 1 15 112 1 34 (none) “double double” 1 11 104 2 31 (none) “quad double” 1 11 208 4 62 (none) “multiple” 1 varies varies varies varies 3 / 33 Numerical reproducibility in scientific computing A December 2012 workshop on reproducibility in scientific computing, held at Brown University, USA, noted that Science is built upon the foundations of theory and experiment validated and improved through open, transparent communication. ... Numerical round-off error and numerical differences are greatly magnified as computational simulations are scaled up to run on highly parallel systems.
    [Show full text]
  • Tech Tools Tech Tools
    NEWS Tech Tools Tech Tools LLVM 3.0 Released Low Level Virtual Machine (LLVM) recently announced ver- replacing the C/ Objective-C compiler in the GCC system with a sion 3.0 of it compiler infrastructure. Originally implemented more easily integrated system and wider support for multithread- for C/ C++, the language-agnostic design of LLVM has ing. Other features include a new register allocator (which can spawned a wide variety of provide substantial perfor- front ends, including Objec- mance improvements in gen- tive-C, Fortran, Ada, Haskell, erated code), full support for Java bytecode, Python, atomic operations and the Ruby, ActionScript, GLSL, new C++ memory model, Clang, and others. and major improvement in The new release of LLVM the MIPS back end. represents six months of de- All LLVM releases are velopment over the previous available for immediate version and includes several download from the LLVM re- major changes, including dis- leases web site at: http:// continued support for llvm- llvm.​­org/​­releases/. For more gcc; the developers recom- information about LLVM, mend switching to Clang or visit the main LLVM website DragonEgg. Clang is aimed at at: http://​­llvm.​­org/. YaCy Search Engine Online Open64 5.0 Released The YaCy project has released version 1.0 of its Open64, the open source (GPLv2-licensed) peer-to-peer Free Software search engine. YaCy compiler for C/C++ and Fortran that’s does not use a central server; instead, its search re- backed by AMD and has been developed by sults come from a network of independent peers. SGI, HP, and various universities and re- According to the announcement, in this type of dis- search organizations, recently released ver- tributed network, no single entity decides which sion 5.0.
    [Show full text]
  • A Library for Interval Arithmetic Was Developed
    1 Verified Real Number Calculations: A Library for Interval Arithmetic Marc Daumas, David Lester, and César Muñoz Abstract— Real number calculations on elementary functions about a page long and requires the use of several trigonometric are remarkably difficult to handle in mechanical proofs. In this properties. paper, we show how these calculations can be performed within In many cases the formal checking of numerical calculations a theorem prover or proof assistant in a convenient and highly automated as well as interactive way. First, we formally establish is so cumbersome that the effort seems futile; it is then upper and lower bounds for elementary functions. Then, based tempting to perform the calculations out of the system, and on these bounds, we develop a rational interval arithmetic where introduce the results as axioms.1 However, chances are that real number calculations take place in an algebraic setting. In the external calculations will be performed using floating-point order to reduce the dependency effect of interval arithmetic, arithmetic. Without formal checking of the results, we will we integrate two techniques: interval splitting and taylor series expansions. This pragmatic approach has been developed, and never be sure of the correctness of the calculations. formally verified, in a theorem prover. The formal development In this paper we present a set of interactive tools to automat- also includes a set of customizable strategies to automate proofs ically prove numerical properties, such as Formula (1), within involving explicit calculations over real numbers. Our ultimate a proof assistant. The point of departure is a collection of lower goal is to provide guaranteed proofs of numerical properties with minimal human theorem-prover interaction.
    [Show full text]
  • Signedness-Agnostic Program Analysis: Precise Integer Bounds for Low-Level Code
    Signedness-Agnostic Program Analysis: Precise Integer Bounds for Low-Level Code Jorge A. Navas, Peter Schachte, Harald Søndergaard, and Peter J. Stuckey Department of Computing and Information Systems, The University of Melbourne, Victoria 3010, Australia Abstract. Many compilers target common back-ends, thereby avoid- ing the need to implement the same analyses for many different source languages. This has led to interest in static analysis of LLVM code. In LLVM (and similar languages) most signedness information associated with variables has been compiled away. Current analyses of LLVM code tend to assume that either all values are signed or all are unsigned (except where the code specifies the signedness). We show how program analysis can simultaneously consider each bit-string to be both signed and un- signed, thus improving precision, and we implement the idea for the spe- cific case of integer bounds analysis. Experimental evaluation shows that this provides higher precision at little extra cost. Our approach turns out to be beneficial even when all signedness information is available, such as when analysing C or Java code. 1 Introduction The “Low Level Virtual Machine” LLVM is rapidly gaining popularity as a target for compilers for a range of programming languages. As a result, the literature on static analysis of LLVM code is growing (for example, see [2, 7, 9, 11, 12]). LLVM IR (Intermediate Representation) carefully specifies the bit- width of all integer values, but in most cases does not specify whether values are signed or unsigned. This is because, for most operations, two’s complement arithmetic (treating the inputs as signed numbers) produces the same bit-vectors as unsigned arithmetic.
    [Show full text]
  • Xcode Package from App Store
    KH Computational Physics- 2016 Introduction Setting up your computing environment Installation • MAC or Linux are the preferred operating system in this course on scientific computing. • Windows can be used, but the most important programs must be installed – python : There is a nice package ”Enthought Python Distribution” http://www.enthought.com/products/edudownload.php – C++ and Fortran compiler – BLAS&LAPACK for linear algebra – plotting program such as gnuplot Kristjan Haule, 2016 –1– KH Computational Physics- 2016 Introduction Software for this course: Essentials: • Python, and its packages in particular numpy, scipy, matplotlib • C++ compiler such as gcc • Text editor for coding (for example Emacs, Aquamacs, Enthought’s IDLE) • make to execute makefiles Highly Recommended: • Fortran compiler, such as gfortran or intel fortran • BLAS& LAPACK library for linear algebra (most likely provided by vendor) • open mp enabled fortran and C++ compiler Useful: • gnuplot for fast plotting. • gsl (Gnu scientific library) for implementation of various scientific algorithms. Kristjan Haule, 2016 –2– KH Computational Physics- 2016 Introduction Installation on MAC • Install Xcode package from App Store. • Install ‘‘Command Line Tools’’ from Apple’s software site. For Mavericks and lafter, open Xcode program, and choose from the menu Xcode -> Open Developer Tool -> More Developer Tools... You will be linked to the Apple page that allows you to access downloads for Xcode. You wil have to register as a developer (free). Search for the Xcode Command Line Tools in the search box in the upper left. Download and install the correct version of the Command Line Tools, for example for OS ”El Capitan” and Xcode 7.2, Kristjan Haule, 2016 –3– KH Computational Physics- 2016 Introduction you need Command Line Tools OS X 10.11 for Xcode 7.2 Apple’s Xcode contains many libraries and compilers for Mac systems.
    [Show full text]
  • How to Access Python for Doing Scientific Computing
    How to access Python for doing scientific computing1 Hans Petter Langtangen1,2 1Center for Biomedical Computing, Simula Research Laboratory 2Department of Informatics, University of Oslo Mar 23, 2015 A comprehensive eco system for scientific computing with Python used to be quite a challenge to install on a computer, especially for newcomers. This problem is more or less solved today. There are several options for getting easy access to Python and the most important packages for scientific computations, so the biggest issue for a newcomer is to make a proper choice. An overview of the possibilities together with my own recommendations appears next. Contents 1 Required software2 2 Installing software on your laptop: Mac OS X and Windows3 3 Anaconda and Spyder4 3.1 Spyder on Mac............................4 3.2 Installation of additional packages.................5 3.3 Installing SciTools on Mac......................5 3.4 Installing SciTools on Windows...................5 4 VMWare Fusion virtual machine5 4.1 Installing Ubuntu...........................6 4.2 Installing software on Ubuntu....................7 4.3 File sharing..............................7 5 Dual boot on Windows8 6 Vagrant virtual machine9 1The material in this document is taken from a chapter in the book A Primer on Scientific Programming with Python, 4th edition, by the same author, published by Springer, 2014. 7 How to write and run a Python program9 7.1 The need for a text editor......................9 7.2 Spyder................................. 10 7.3 Text editors.............................. 10 7.4 Terminal windows.......................... 11 7.5 Using a plain text editor and a terminal window......... 12 8 The SageMathCloud and Wakari web services 12 8.1 Basic intro to SageMathCloud...................
    [Show full text]
  • Ginga Documentation Release 2.5.20160420043855
    Ginga Documentation Release 2.5.20160420043855 Eric Jeschke May 05, 2016 Contents 1 About Ginga 1 2 Copyright and License 3 3 Requirements and Supported Platforms5 4 Getting the source 7 5 Building and Installation 9 5.1 Detailed Installation Instructions for Ginga...............................9 6 Documentation 15 6.1 What’s New in Ginga?.......................................... 15 6.2 Ginga Quick Reference......................................... 19 6.3 The Ginga FAQ.............................................. 22 6.4 The Ginga Viewer and Toolkit Manual................................. 25 6.5 Reference/API.............................................. 87 7 Bug reports 107 8 Developer Info 109 9 Etymology 111 10 Pronunciation 113 11 Indices and tables 115 Python Module Index 117 i ii CHAPTER 1 About Ginga Ginga is a toolkit designed for building viewers for scientific image data in Python, visualizing 2D pixel data in numpy arrays. It can view astronomical data such as contained in files based on the FITS (Flexible Image Transport System) file format. It is written and is maintained by software engineers at the Subaru Telescope, National Astronomical Observatory of Japan. The Ginga toolkit centers around an image display class which supports zooming and panning, color and intensity mapping, a choice of several automatic cut levels algorithms and canvases for plotting scalable geometric forms. In addition to this widget, a general purpose “reference” FITS viewer is provided, based on a plugin framework. A fairly complete set of “standard” plugins are provided for features that we expect from a modern FITS viewer: panning and zooming windows, star catalog access, cuts, star pick/fwhm, thumbnails, etc. 1 Ginga Documentation, Release 2.5.20160420043855 2 Chapter 1.
    [Show full text]
  • Complete Interval Arithmetic and Its Implementation on the Computer
    Complete Interval Arithmetic and its Implementation on the Computer Ulrich W. Kulisch Institut f¨ur Angewandte und Numerische Mathematik Universit¨at Karlsruhe Abstract: Let IIR be the set of closed and bounded intervals of real numbers. Arithmetic in IIR can be defined via the power set IPIR (the set of all subsets) of real numbers. If divisors containing zero are excluded, arithmetic in IIR is an algebraically closed subset of the arithmetic in IPIR, i.e., an operation in IIR performed in IPIR gives a result that is in IIR. Arithmetic in IPIR also allows division by an interval that contains zero. Such division results in closed intervals of real numbers which, however, are no longer bounded. The union of the set IIR with these new intervals is denoted by (IIR). The paper shows that arithmetic operations can be extended to all elements of the set (IIR). On the computer, arithmetic in (IIR) is approximated by arithmetic in the subset (IF ) of closed intervals over the floating-point numbers F ⊂ IR. The usual exceptions of floating-point arithmetic like underflow, overflow, division by zero, or invalid operation do not occur in (IF ). Keywords: computer arithmetic, floating-point arithmetic, interval arithmetic, arith- metic standards. 1 Introduction or a Vision of Future Computing Computers are getting ever faster. The time can already be foreseen when the P C will be a teraflops computer. With this tremendous computing power scientific computing will experience a significant shift from floating-point arithmetic toward increased use of interval arithmetic. With very little extra hardware, interval arith- metic can be made as fast as simple floating-point arithmetic [3].
    [Show full text]
  • Pyconfr 2014 1 / 105 Table Des Matières Bienvenue À Pyconfr 2014
    PyconFR 2014 1 / 105 Table des matières Bienvenue à PyconFR 2014...........................................................................................................................5 Venir à PyconFR............................................................................................................................................6 Plan du campus..........................................................................................................................................7 Bâtiment Thémis...................................................................................................................................7 Bâtiment Nautibus................................................................................................................................8 Accès en train............................................................................................................................................9 Accès en avion........................................................................................................................................10 Accès en voiture......................................................................................................................................10 Accès en vélo...........................................................................................................................................11 Plan de Lyon................................................................................................................................................12
    [Show full text]
  • Python Guide Documentation Release 0.0.1
    Python Guide Documentation Release 0.0.1 Kenneth Reitz February 19, 2018 Contents 1 Getting Started with Python 3 1.1 Picking an Python Interpreter (3 vs. 2).................................3 1.2 Properly Installing Python........................................5 1.3 Installing Python 3 on Mac OS X....................................6 1.4 Installing Python 3 on Windows.....................................8 1.5 Installing Python 3 on Linux.......................................9 1.6 Installing Python 2 on Mac OS X.................................... 10 1.7 Installing Python 2 on Windows..................................... 12 1.8 Installing Python 2 on Linux....................................... 13 1.9 Pipenv & Virtual Environments..................................... 14 1.10 Lower level: virtualenv.......................................... 17 2 Python Development Environments 21 2.1 Your Development Environment..................................... 21 2.2 Further Configuration of Pip and Virtualenv............................... 26 3 Writing Great Python Code 29 3.1 Structuring Your Project......................................... 29 3.2 Code Style................................................ 40 3.3 Reading Great Code........................................... 49 3.4 Documentation.............................................. 50 3.5 Testing Your Code............................................ 53 3.6 Logging.................................................. 58 3.7 Common Gotchas............................................ 60 3.8 Choosing
    [Show full text]
  • Prof. Jim Crutchfield Nonlinear Physics— Modeling Chaos
    Nonlinear Physics— Modeling Chaos & Complexity Prof. Jim Crutchfield Physics Department & Complexity Sciences Center University of California, Davis cse.ucdavis.edu/~chaos Tuesday, March 30, 2010 1 Mechanism Revived Deterministic chaos Nature actively produces unpredictability What is randomness? Where does it come from? Specific mechanisms: Exponential divergence of states Sensitive dependence on parameters Sensitive dependence on initial state ... Tuesday, March 30, 2010 2 Brief History of Chaos Discovery of Chaos: 1890s, Henri Poincaré Invents Qualitative Dynamics Dynamics in 20th Century Develops in Mathematics (Russian & Europe) Exiled from Physics Re-enters Science in 1970s Experimental tests Simulation Flourishes in Mathematics: Ergodic theory & foundations of Statistical Mechanics Topological dynamics Catastrophe/Singularity theory Pattern formation/center manifold theory ... Tuesday, March 30, 2010 3 Discovering Order in Chaos Problem: No “closed-form” analytical solution for predicting future of nonlinear, chaotic systems One can prove this! Consequence: Each nonlinear system requires its own representation Pattern recognition: Detecting what we know Ultimate goal: Causal explanation What are the hidden mechanisms? Pattern discovery: Finding what’s truly new Tuesday, March 30, 2010 4 Major Roadblock to the Scientific Algorithm No “closed-form” analytical solutions Baconian cycle of successively refining models broken Solution: Qualitative dynamics: “Shape” of chaos Computing Tuesday, March 30, 2010 5 Logic of the Course Two
    [Show full text]
  • Introduction to Python ______
    Center for Teaching, Research and Learning Research Support Group American University, Washington, D.C. Hurst Hall 203 [email protected] (202) 885-3862 Introduction to Python ___________________________________________________________________________________________________________________ Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented programming. It is used for its readability and productivity. WORKSHOP OBJECTIVE: This workshop is designed to give a basic understanding of Python, including object types, Python operations, Python module, basic looping, function, and control flows. By the end of this workshop you will: • Know how to install Python on your own computer • Understand the interface and language of Python • Be familiar with Python object types, operations, and modules • Create loops and functions • Load and use Python packages (libraries) • Use Python both as a powerful calculator and to write software that accept inputs and produce conditional outputs. NOTE: Many of our examples are from the Python website’s tutorial, http://docs.python.org/py3k/contents.html. We often include references to the relevant chapter section, which you could consult to get greater depth on that topic. I. Installation and starting Python Python is distributed free from the website http://www.python.org/. There are distributions for Windows, Mac, Unix, and Linux operating systems. Use http://python.org/download to find these distribution files for easy installation. The latest version of Python is version 3.1. Once installed, you can find the Python3.1 folder in “Programs” of the Windows “start” menu. For computers on campus, look for the “Math and Stats Applications” folder.
    [Show full text]