Difference: IntroductionToNopIoTAndPython (10 vs. 11)

Revision 112019-06-15 - IsaacArmahMensah

Line: 1 to 1
 
META TOPICPARENT name="WorkshopSlides"

Start Presentation

Slide 1: Introduction to Internet of Things (IoT)

Line: 174 to 174
 

Thonny Python Shell and Editor

Changed:
<
<
Here you see the 2 idle windows.
>
>
Here you see the 2 thonny windows.
  The top one contains the editor, the second the Python shell
Line: 379 to 379
  We can therefore find out if the module is imported or executed by checking the name variable:
Changed:
<
<
if _name_ == "__main__"
>
>
if __name __ == "__main__"
  this executes the main code only if not imported into a main program

Packages

Changed:
<
<
Packages simple group of modules under one name.
>
>
Packages simply group modules under one name.
 
Changed:
<
<
Each package is a directory which MUST contain a a specific file calle
>
>
Each package is a directory which MUST contain a specific file called
 
Changed:
<
<
__init__.py which indicating the directory is a package.
>
>
__init__.py indicating the directory is a package.
 
Changed:
<
<
the init.py file may be empty.
>
>
the __ init __.py file may be empty.
  Package can be imported the same way as module.
Line: 401 to 401
  package.png

Changed:
<
<

Classes

>
>

Class

  Almost everything in Python is an object, with its properties and methods.
Line: 411 to 411
  A child class inherits the attributes and methods from its parent class.

Changed:
<
<

Creating Classes

>
>

Creating a Class

 
Changed:
<
<
The syntax for creation of classes is similar to functions

>
>
The syntax for creating a class is similar to functions

  class.png
Line: 423 to 423
  The short description of the class can be found in the instance variable __Doc.__

Changed:
<
<

Classes Example

>
>

Class Example

  classes.png

Libraries

Changed:
<
<
Libraries are a collection python packages that are found in different that gives a package hierarchy.
>
>
Python library is a collection of functions and methods that allows you to
 
Changed:
<
<
The only difference is python libraries or packages have a init.py file present in its directories.

A very typical example of a python library is matplotlib for plotting.

>
>
perform many actions without writing your code

A very typical example of a python library is matplotlib for plotting.
  mathplotlibCode.png
Line: 518 to 516
 
META FILEATTACHMENT attachment="mathplotlibCode.png" attr="" comment="" date="1560513877" name="mathplotlibCode.png" path="mathplotlibCode.png" size="30671" user="UliRaich" version="1"
META FILEATTACHMENT attachment="callbackReg.png" attr="" comment="" date="1560514438" name="callbackReg.png" path="callbackReg.png" size="16057" user="UliRaich" version="1"
META FILEATTACHMENT attachment="dummyGUI.png" attr="" comment="" date="1560514439" name="dummyGUI.png" path="dummyGUI.png" size="33352" user="UliRaich" version="1"
Added:
>
>
META FILEATTACHMENT attachment="binaryOps.py.txt" attr="" comment="" date="1560561744" name="binaryOps.py.txt" path="binaryOps.py.txt" size="579" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="callback.py.txt" attr="" comment="" date="1560561744" name="callback.py.txt" path="callback.py.txt" size="240" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="callbacks.py.txt" attr="" comment="" date="1560561744" name="callbacks.py.txt" path="callbacks.py.txt" size="811" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="class.py.txt" attr="" comment="" date="1560561744" name="class.py.txt" path="class.py.txt" size="216" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="class2.py.txt" attr="" comment="" date="1560561744" name="class2.py.txt" path="class2.py.txt" size="921" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="cmdLineArgs.py.txt" attr="" comment="" date="1560561744" name="cmdLineArgs.py.txt" path="cmdLineArgs.py.txt" size="183" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="dict.py.txt" attr="" comment="" date="1560561744" name="dict.py.txt" path="dict.py.txt" size="772" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="elif.py.txt" attr="" comment="" date="1560561744" name="elif.py.txt" path="elif.py.txt" size="517" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="fibocallback.py.txt" attr="" comment="" date="1560561744" name="fibocallback.py.txt" path="fibocallback.py.txt" size="552" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="function.py.txt" attr="" comment="" date="1560561744" name="function.py.txt" path="function.py.txt" size="581" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="helloWorld.py.txt" attr="" comment="" date="1560561906" name="helloWorld.py.txt" path="helloWorld.py.txt" size="44" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="if.py.txt" attr="" comment="" date="1560561906" name="if.py.txt" path="if.py.txt" size="138" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="inheritance.py.txt" attr="" comment="" date="1560561906" name="inheritance.py.txt" path="inheritance.py.txt" size="717" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="List.py.txt" attr="" comment="" date="1560561906" name="List.py.txt" path="List.py.txt" size="787" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="modules.py.txt" attr="" comment="" date="1560561906" name="modules.py.txt" path="modules.py.txt" size="272" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="operators.py.txt" attr="" comment="" date="1560561906" name="operators.py.txt" path="operators.py.txt" size="412" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="plotty.py.txt" attr="" comment="" date="1560561906" name="plotty.py.txt" path="plotty.py.txt" size="462" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="string.py.txt" attr="" comment="" date="1560561906" name="string.py.txt" path="string.py.txt" size="1194" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="switch.py.txt" attr="" comment="" date="1560561906" name="switch.py.txt" path="switch.py.txt" size="355" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="tuples.py.txt" attr="" comment="" date="1560561940" name="tuples.py.txt" path="tuples.py.txt" size="629" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="variable.py.txt" attr="" comment="" date="1560561940" name="variable.py.txt" path="variable.py.txt" size="929" user="IsaacArmahMensah" version="1"
META FILEATTACHMENT attachment="while.py.txt" attr="" comment="" date="1560561940" name="while.py.txt" path="while.py.txt" size="474" user="IsaacArmahMensah" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback