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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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.
See the Python Wiki for a list of Python IDEs, https://wiki.python.org/moin/IntegratedDevelopmentEnvironments.
- 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.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
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
DOI: https://doi.org/10.1007/978-3-030-82635-2_1
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-030-82634-5
Online ISBN: 978-3-030-82635-2
eBook Packages: Behavioral Science and PsychologyBehavioral Science and Psychology (R0)