Skip to content

Instantly share code, notes, and snippets.

@imarban
Last active August 22, 2016 06:31
Show Gist options
  • Save imarban/7afbc1898cf2af52aeda72432f8791a9 to your computer and use it in GitHub Desktop.
Save imarban/7afbc1898cf2af52aeda72432f8791a9 to your computer and use it in GitHub Desktop.
class WirelessPrinter:
def __init__(ip):
self.ip = ip
def print_now(report):
open_connection()
report.prepare_for_print()
# Code required to print to an actual printer
close_connection()
printer = WirelessPrinter("192.168.1.13")
report = SalesReport()
printer.print_now(report)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment