{ "cells": [ { "cell_type": "markdown", "id": "402aedfb-fa48-407d-9a69-73167175a0f1", "metadata": {}, "source": [ "# Preliminary words\n", "\n", "* **main goals:** knowledge transfer + having fun 😜\n", "* this will probably turn out to be several sessions, not just one ...\n", "* **interrupt me, if I am going too fast and tell me to slow down!**\n", "* **please speak up if you have a question** or if you don't understand some concept I am talking about\n", "* this may not sound very technical at the beginning, because I want to get you set up with your own Python and we need to lean a few basics of the user interface you will use to talk to Python\n", "* **this is meant to be interactive**, I encourage you to follow along, try stuff yourself or ask for concrete experiments or for explanations of behavior you observe\n", "* that said: **there will be notes** ... e.g. what you see on screen now; in the form of of the Jupyter notebooks and Markdown documentation ... even code examples\n", "* I **may gloss over certain details** at the beginning for brevity" ] }, { "cell_type": "markdown", "id": "c3c673a6-8090-4f83-b33c-313bb6831108", "metadata": { "jp-MarkdownHeadingCollapsed": true }, "source": [ "# Python: some facts\n", "\n", "* Brief history:\n", " * 1989 Dutch programmer [Guido van Rossum](https://en.wikipedia.org/wiki/Guido_van_Rossum) creates Python\n", " * 1991 First public release of Python: 0.9.0\n", " * 1994 Python 1.0 released\n", " * 2000 Python 2.0 released with features such as list comprehensions and Unicode support\n", " * 2008 Python 3.0 released; _backwards-incompatible_ with certain \"bridges\"\n", " * 2020 Python 2.x reaches end of life; plenty of Python code is still stuck on 2.x\n", "* The \"canonical\" implementation is [CPython](https://python.org) (C, because it's written in C)\n", " * Alternative implementations exist: IronPython (.NET), Jython (JVM), PyPy (JITted), MicroPython (for microcontrollers), ...\n", "* _This_ will focus on CPython\n", "* Python comes \"batteries included\"\n", " * There is a comprehensive \"standard library\" providing all sorts of amenities to those writing Python\n", "* Python is used in serious software products, e.g. Dropbox\n", " * Python's original author and former \"benevolent dictator for life\" (BDFL) Guido van Rossum used to work for Dropbox, now works for Microsoft\n", "* The name Python alludes to the British comedy troupe Monty Python\n", " * Many Python code samples include references to Monty Python sketches\n", " * The IDE (editor) shipping with Python is called IDLE after Eric Idle, a member of the troupe\n", " * The Python logo sports the corresponding reptile" ] }, { "cell_type": "markdown", "id": "5bfe4f5c-7ecd-440c-96bb-bf4435368621", "metadata": {}, "source": [ "# What to expect\n", "\n", "* Introduction **not just for developers**\n", " * Peleg previously did a \"Python for C++ developers\" ... _this_ is not a repeat, although certain elements will of course _also_ appear here\n", "* We will **focus on Python 3.10 and newer**\n", " * If questions come up about older versions, including 2.x I'll try to address them, but it's been a while since I moved from 2.x to 3.x\n", " * Some of the code examples may not work on older Python versions, e.g. `match`/`case`\n", "* While I am fairly fluent, please don't expect me to know _everything_ by heart; as is often the case my knowledge is based on those parts I used in practice\n", "* Developers knowing any other programming language _will_ have a head start, but **our speed will be adjusted to non-developers as needed!**\n", " * This means that we will introduce some very basic concepts at the beginning to get going, then **reuse the acquired knowledge and apply it in other areas**\n", "* **What can I use this for?**\n", " * **automation** of daily tasks (compare to formulas in Excel/spreadsheet cells or macros)\n", " * sifting through text, mutating or otherwise **processing text**\n", " * if you participated in my regular expression introduction (or will participate in a future repetition) this can be applied almost 1:1\n", " * generally **data analysis** (not a focus here, but I'll provide some pointers)\n", " * **[automating/scripting of software](https://wiki.python.org/moin/AppsWithPythonScripting)**\n", " * Autodesk Maya, Blender (3D modeling)\n", " * GIMP (graphics manipulation)\n", " * Sublime Text (an editor)\n", " * ArcGIS, QGIS (GIS software)\n", " * certain home automation\n", " * understanding Conan, if you're a C/C++ developer ... or meson if you deal with meson-based builds\n", " * ... and much more\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.1" } }, "nbformat": 4, "nbformat_minor": 5 }