format with black
This commit is contained in:
parent
dc518bdefb
commit
a023da91e0
@ -7,14 +7,16 @@ from io import BytesIO
|
||||
# Initialize Flask app
|
||||
app = Flask(__name__)
|
||||
|
||||
@app.route('/', methods=['GET'])
|
||||
|
||||
@app.route("/", methods=["GET"])
|
||||
def do_print():
|
||||
#p = Usb(0x04b8, 0x0e28, 0)
|
||||
p = CupsPrinter(host='localhost', port=631, printer_name='TM-T20III')
|
||||
# p = Usb(0x04b8, 0x0e28, 0)
|
||||
p = CupsPrinter(host="localhost", port=631, printer_name="TM-T20III")
|
||||
p.text("Hello World\n")
|
||||
p.cut()
|
||||
p.close()
|
||||
return "OK"
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=False, host='0.0.0.0', port=9999)
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=False, host="0.0.0.0", port=9999)
|
||||
|
Loading…
x
Reference in New Issue
Block a user