Sunday, February 26, 2017

Python


  • install
    • dnf install -y python-devel
    • dnf install libtiff-devel libjpeg-devel libzip-devel freetype-devel lcms2-devel libwebp-devel tcl-devel tk-devel
    • graph
      • PIL: pip install Image
      • dnf install tkinter
      • pip install matplotlib
  • subprocess.Popen
    • def subprocess_Popen(cmd, wait = True):
    •     pipe = subprocess.Popen(cmd, shell = True, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
    •     outs, errs = pipe.communicate()
    •     if (outs):
    •         print(outs)
    •     if (errs):
    •         print(errs)
  • Django