mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	 8a77c963c3
			
		
	
	8a77c963c3
	
	
	
		
			
			* changed structure of index-file * copied the WIKI at commit 67601b2d33f5a3cf8e9633e6ad92cca286840680 * adapted the markdown to rst
		
			
				
	
	
		
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			ReStructuredText
		
	
	
	
	
	
| ********
 | |
| Printers
 | |
| ********
 | |
| 
 | |
| .. note:: **TODO** Merge this page into the API-description.
 | |
| 
 | |
| There 3 different type of printers:
 | |
| 
 | |
| USB(idVendor, idProduct, interface, in\_ep, out\_ep)
 | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | |
| 
 | |
| Based on pyusb and libusb-1.0
 | |
| 
 | |
| * ``idVendor`` is the Vendor ID
 | |
| * ``idProduct`` is the Product ID
 | |
| * ``interface`` is the USB device interface (default = 0)
 | |
| *  ``in_ep`` is the input end point (default = 0x82)
 | |
| * ``out_ep`` is the output end point (default = 0x01)
 | |
| 
 | |
| Serial("devfile", baudrate, bytesize, timeout)
 | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 | |
| 
 | |
| Based on pyserial, default values are based on the defaults set by
 | |
| DIP\_SWITCH\_1 on the documentation(hardware side).
 | |
| 
 | |
| * ``devfile`` is an alphanumeric device file name under /dev filesystem (default = /ev/ttyS0)
 | |
| * ``baudrate`` is the Baud rate for serial transmission (default = 9600)
 | |
| * ``bytesize`` sets the serial buffer size (default = 8)
 | |
| * ``timeout`` defines Read/Write timeout (default = 1)
 | |
| 
 | |
| Network("host", port)
 | |
| ^^^^^^^^^^^^^^^^^^^^^
 | |
| 
 | |
| Based on socket
 | |
| * ``host`` is an alphanumeric host name, could be either DNS host name or IP address.
 | |
| * ``port`` to write to (default = 9100)
 | |
| 
 | |
| File("file\_name")
 | |
| ^^^^^^^^^^^^^^^^^^
 | |
| 
 | |
| Printcap printers
 | |
| * ``file_name`` is the full path to the device file name
 |