Top Banner
Click to edit Master title style Introduction to Python programming language Matevž Dolenc Topic 2: Fundamentals of programming BIM A+3: Parametric Modelling in BIM
14

Introduction to Python programming language - Matevž Dolenc

Mar 06, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to Python programming language - Matevž Dolenc

Click to edit Master title style

Introduction to Python programming language

Matevž Dolenc

Topic 2: Fundamentals of programming

BIM A+3: Parametric Modelling in BIM

Page 2: Introduction to Python programming language - Matevž Dolenc

© 2019 by authors This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

2BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 3: Introduction to Python programming language - Matevž Dolenc

• Compiled • A program is executed (i.e. the source is first compiled, and the result of that compilation is

expected) • A "program" in general, is a sequence of instructions written so that a computer can

perform certain task. • Examples: C/C++, Fortran, Objective-C, Swift, …

• Scripting • A script is interpreted • A "script" is code written in a scripting language. A scripting language is nothing but a type

of programming language in which we can write code to control another software application.

• Examples: Python, Ruby, Perl, …

3

Compiled vs Scripting languages

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 4: Introduction to Python programming language - Matevž Dolenc

• Python is a general purpose programming language that is often applied in scripting roles. • So, Python is programming language as well as scripting language. • Python is also called as Interpreted language

• Differences between program and scripting language. • A program is executed (i.e. the source is first compiled, and the result of that compilation is

expected) • A "program" in general, is a sequence of instructions written so that a computer can

perform certain task.

4

What is Python?

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 5: Introduction to Python programming language - Matevž Dolenc

5

Why Python?

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Python: Qu'est-ce que c'est?

A high-levelprogramming

language �with a simple &

easy to learnsyntax ��huge

standardlibrary

�andpackages for

mathematics, data

processing, UI ĚĞƐŝŐŶ�

print ũ�����asŝũfor i in [1,2,3]:print i

Matplotlib,SciPy,NumPy,PyQTřŝ

ctypes,sockets,files,regexřŝ

Multi-paradigm(object oriented, functionalŝƀ

Page 6: Introduction to Python programming language - Matevž Dolenc

6

Scientific/Engineering workflow

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 7: Introduction to Python programming language - Matevž Dolenc

7

Scientific/Engineering workflow using software

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 8: Introduction to Python programming language - Matevž Dolenc

8

Scientific/Engineering workflow using Python

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 9: Introduction to Python programming language - Matevž Dolenc

9

BIM and Python

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 10: Introduction to Python programming language - Matevž Dolenc

• Download and install • Official distribution: https://www.python.org • Anaconda (Science friendly distribution): https://www.anaconda.com

• Documentation • Python has one of the best documentation • Official documentation: https://www.python.org/doc/

• Additional resources • Learning Data Science: Our Favourite Python Resources:

https://hackernoon.com/learning-data-science-our-favorite-python-resources-from-free-to-not-877fca5c92f0

• Talk Python to Me: https://talkpython.fm/home

10

How to get started?

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 11: Introduction to Python programming language - Matevž Dolenc

11

Python editors

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

https://code.visualstudio.com

https://www.jetbrains.com/pycharm/

https://atom.io

Page 12: Introduction to Python programming language - Matevž Dolenc

• Download and install IfcOpenShell-Python • http://ifcopenshell.org

• Read articles about IfcOpenShell • http://academy.ifcopenshell.org

• Try IFC pipeline (but do not stress the service!) • https://view.ifcopenshell.org

12

Python and IFC

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 13: Introduction to Python programming language - Matevž Dolenc

13

?

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language

Page 14: Introduction to Python programming language - Matevž Dolenc

14

https://www.coriers.com/our-favorite-python-books-courses-and-youtube-videos/

BIM A+3: Parametric Modelling in BIM | Topic 2: Fundamentals of programming | Introduction to Python programming language