πŸ•ŠοΈ MigrationΒΆ

From v0.3 to v1.0ΒΆ

  • ThermalPrinter.justify():

    + from thermalprinter import Justify
    
    - printer.justify("L")
    + printer.justify(Justify.LEFT)
    
    - printer.justify("C")
    + printer.justify(Justify.CENTER)
    
    - printer.justify("R")
    + printer.justify(Justify.RIGHT)
    
  • ThermalPrinter.size():

    + from thermalprinter import Size
    
    - printer.size("S")
    + printer.size(Size.SMALL)
    
    - printer.size("M")
    + printer.size(Size.MEDIUM)
    
    - printer.size("L")
    + printer.size(Size.LARGE)
    
  • ThermalPrinter.underline():

    + from thermalprinter import Underline
    
    - printer.underline(0)
    + printer.underline(Underline.OFF)
    
    - printer.underline(1)
    + printer.underline(Underline.THIN)
    
    - printer.underline(2)
    + printer.underline(Underline.THICK)
    
  • tools.print_char() β†’ ThermalPrinter.print_char():

    - from thermalprinter.tools import print_char
    
    - print_char("现")
    + printer.print_char("现")
    
  • tools.printer_tests() β†’ ThermalPrinter.demo():

    - from thermalprinter.tools import printer_tests
    
    - printer_tests()
    + printer.demo()
    

From v0.2 to v0.3ΒΆ

  • tools.test_char() β†’ tools.print_char():

    - from thermalprinter.tools import test_char
    + from thermalprinter.tools import print_char
    
    - test_char("现")
    + print_char("现")
    
  • tools.testing() β†’ tools.printer_tests():

    - from thermalprinter.tools import testing
    + from thermalprinter.tools import printer_tests
    
    - testing()
    + printer_tests()