======Python====== This page provides basic walkthroughs and tutorials for the programing language Python. We do not cover all aspects of programming in Python. We provide some starting points and expect you find more. We recommend {[a4b99rph:Wentworth2012]} as your main teaching material. The more advanced book {[a4b99rph:Pilgrim2009]} may perhaps be more interesting for experienced programmers /* ===== PyCharm ===== Integrated Development Environment (IDE) Pro version: - log in by using your faculty email https://account.jetbrains.com/login - then you may download https://www.jetbrains.com/student/ For us, Community Edition is actually quite fine https://www.jetbrains.com/pycharm/download/ We actually need none. So if you are used to work in Emacs, Vim, ... and terminal/shell yust keep doing. */ =====Installing Python===== If you are using Linux, Python is most likely already installed. Otherwise, install it using your SW manager (like Synaptic). Python is also quite likely to be already installed in Mac OS X. Try running terminal and write which python. In the case of MS Windows, it will not be installed. You will have to [[http://www.python.org/download/|install]] it. In a terminal window (Linux or OSX) you can check: [182] python3.2 Python 3.2.2 (default, Mar 15 2012, 17:46:27) [GCC 4.5.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> [53] python3 Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> You can quit by ''Ctrl-d'', or typing ''exit()'' You will need **version 3.6.x or higher** installed. Please be aware that on many machines Python 2.7.x is still often the default Python interpreter. Python 3 is not fully compatible with Python 2.x. There is a [[http://docs.python.org/library/2to3.html|code converter]] which makes the possible transition easier. Many important [[http://python3wos.appspot.com/|libraries]] have been already ported to Python 3. /* ===== Visual Studio (Code) ===== * Integrated Development Environment (IDE) * Programming in VS Code is a crucial part of the PRG course * Install Python (as described above) before trying to install VS Code. * Then, install VS Code: [[https://code.visualstudio.com/|https://code.visualstudio.com/]]. * Once installed, run VS Code. Click 'Extensions' on the vertical bar on the left side and install //Python// and //Live Share Extension Pack//. * //Live Share// will be used to share your screen with the teacher in case you are stuck and need help. */ ===== PyCharm ===== Integrated Development Environment (IDE). There are two different versions: - **Community edition**: //free for everyone//, (more than) sufficient for our course - **Professional version**: more features for professional programmers, paid but //free for students//! In order to get the Professional version: * Visit the CTU download portal [[https://download.cvut.cz/en/jetbrains/|https://download.cvut.cz/en/jetbrains/]] and follow the instructions. //or// * log in by using your faculty email https://account.jetbrains.com/login * then you may download https://www.jetbrains.com/student/ Link: [[https://www.jetbrains.com/pycharm/download/|https://www.jetbrains.com/pycharm/download/]] ======Other walkthroughs====== *[[courses:ae4b99rph:tutorials:python:mswin|MS Windows]] quick guide for setting up your IDE (DrPython or IDLE) under MS Windows. *[[courses:ae4b99rph:tutorials:python:filesystem|Work with files]] quick introduction to working with File Systems in Python. *[[courses:ae4b99rph:tutorials:python:faq]] Problems which, according to our experience are quite common. We continuously update the list.