Skip to main content

A Gentle Introduction to Python

  • Chapter
  • First Online:
Eye-Tracking with Python and Pylink
  • 1139 Accesses

Abstract

Python is a popular programming language that is widely used in the research community. This chapter provides an overview of the basic syntax and building blocks of Python. It is written for readers who have little or no previous experience with Python or programming in general. Experienced Python users can skip this chapter and move on to the chapters focusing on experimental task scripting, eye tracking, and eye movement data analysis and visualization.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 129.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    A shell is a user interface for accessing the computer operating system services. The use of a shell usually involves entering a single command and then receiving the relevant response from the operating system (typically printed in the shell as messages). The Python shell works in the same way, but processes Python commands instead of operating system commands.

  2. 2.

    See the Python Wiki for a list of Python IDEs, https://wiki.python.org/moin/IntegratedDevelopmentEnvironments.

  3. 3.

    Autocompletion can greatly improve coding efficiency. For instance, typing in “math.lo” and then pressing the Tab key in the IDLE shell will list all math functions with names starting with “lo,” e.g., log, log2, and log10.

  4. 4.

    https://docs.python.org/3/reference/expressions.html#operator-precedence

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Wang, Z. (2021). A Gentle Introduction to Python. In: Eye-Tracking with Python and Pylink. Springer, Cham. https://doi.org/10.1007/978-3-030-82635-2_1

Download citation

Publish with us

Policies and ethics