text: import numpy as np
  from osgeo import gdal
  
  #Welche Pythonversion?
  import sys
  print(sys.executable) #qgis-bin.exe ???
  
  
  fn = 'C:/Users/piafe/Desktop/Energie.asc' #set path (keep care of correct backslash!)
  rlayer = iface.addRasterLayer(fn, 'layer.name') #load raster into QGIS
  
  #check information on raster
  print(rlayer.rasterType()) #0 means GrayOrUndefined (single band)
  print(rlayer.bandCount()) #Anzahl der Bänder
  print(type(rlayer))
  
  #rnewlayer = rlayer.toString()
  #lista = rlayer.ReadAsArray() #das funktioniert noch nicht
  
  #Reclassify
  rlayer[np.where(0 < 10000 )] = 1
  rlayer[np.where((10000 < 30000) & (rlayer < 400)) ] = 2
  rlayer[np.where((30000 < 50000) & (rlayer < 600)) ] = 3
  rlayer[np.where((50000 < 70000) & (rlayer < 800)) ] = 4
  rlayer[np.where( 70000 > 10000 )] = 5
  
  
  
  '''#Statistik für ColorRamp
  stats = rlayer.dataProvider().bandStatistics(1, QgsRasterBandStats.All)
  min = stats.minimumValue
  max = stats.maximumValue
  #print(min, max)
  
  fnc = QgsColorRampShader()
  fnc.setColorRampType(QgsColorRampShader.Interpolated)
  lst = [QgsColorRampShader.ColorRampItem(min,QColor(0,255,0)), \
  QgsColorRampShader.ColorRampItem(max, QColor(255,255,0))]
  
  fnc.setColorRampItemList(lst)
  shader = QgsRasterShader()
  shader.setRasterShaderFunction(fnc)
  
  renderer = QgsSingleBandPseudoColorRenderer(rlayer.dataProvider(), 1, shader)
  rlayer.setRenderer(renderer)'''
  
  
  
  
  