Programmierung

Aus Wiki_2020


Python

* notes and tips for updating from Python 2 to Python 3 https://pymotw.com/3/porting_notes.html
* https://docs.python.org/3.1/library/index.html#library-index
* https://py-tutorial-de.readthedocs.io/de/latest/index.html
* https://www.w3schools.com/python/default.asp
* https://www.python-kurs.eu/python3_kurs.php
* https://www.python-kurs.eu/python3_skript_ausfuehren.php Python3 Tutorial
* https://binged.it/2YE2G96  Pyton QT Raspberry
* SELF Explained https://pythontips.com/2013/08/07/the-self-variable-in-python-explained/
* Objekte & self https://pythonbuch.com/objekte.html
* https://en.wikibooks.org/wiki/A_Beginner's_Python_Tutorial

Codeexamples

#An example of a class
class Shape:
   def __init__(self, x, y):
       self.x = x
       self.y = y
       self.description = "This shape has not been described yet"
       self.author = "Nobody has claimed to make this shape yet"
   def area(self):
       return self.x * self.y
   def perimeter(self):
       return 2 * self.x + 2 * self.y
   def describe(self, text):
       self.description = text
   def authorName(self, text):
       self.author = text
   def scaleSize(self, scale):
       self.x = self.x * scale
       self.y = self.y * scale
#create 3 objekts of shape        
    rectangle = Shape(100, 45)  
    long_rectangle = Shape(120,10)
    fat_rectangle = Shape(130,120)
#finding the area of your rectangle:
    print(rectangle.area())
#finding the perimeter of your rectangle:
    print(rectangle.perimeter())
#describing the rectangle
    rectangle.describe("A wide rectangle, more than twice\
    as wide as it is tall")
#making the rectangle 50% smaller
    rectangle.scaleSize(0.5)
#re-printing the new area of the rectangle
    print(rectangle.area())

tkinter

* Grafik mit tkinter https://pythonbasics.org/tkinter/
* http://effbot.org/tkinterbook/tkinter-index.htm#class-reference
* https://tkdocs.com
* https://pythonbasics.org/tkinter_scale/
* Raspi GUI TKinter  https://docs.python.org/3/library/tkinter.html#a-simple-hello-world-program

Diverse

C

MYSQL

Escape 
Sequence    Character Represented by Sequence
  \0         An ASCII NUL (0x00) character.
  \'         A single quote (“'”) character.
  \"         A double quote (“"”) character.
  \b         A backspace character.
  \n         A newline (linefeed) character.
  \r         A carriage return character.
  \t         A tab character.
  \Z         ASCII 26 (Control+Z).
  \\         A backslash (“\”) character.
  \%         A “%” character. 
  \_         A “_” character.