From: Brandon King Date: Wed, 19 Aug 2009 23:03:19 +0000 (+0000) Subject: Moved bcprinter/util.py to bcmagic/util.py X-Git-Tag: 0.3.0~11 X-Git-Url: http://woldlab.caltech.edu/gitweb/?p=htsworkflow.git;a=commitdiff_plain;h=b945a0bf44fdb194885c1e17506b2c2866343876 Moved bcprinter/util.py to bcmagic/util.py --- diff --git a/htsworkflow/frontend/bcprinter/__init__.py b/htsworkflow/frontend/bcprinter/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/htsworkflow/frontend/bcprinter/models.py b/htsworkflow/frontend/bcprinter/models.py deleted file mode 100644 index 71a8362..0000000 --- a/htsworkflow/frontend/bcprinter/models.py +++ /dev/null @@ -1,3 +0,0 @@ -from django.db import models - -# Create your models here. diff --git a/htsworkflow/frontend/bcprinter/util.py b/htsworkflow/frontend/bcprinter/util.py deleted file mode 100644 index 1880728..0000000 --- a/htsworkflow/frontend/bcprinter/util.py +++ /dev/null @@ -1,27 +0,0 @@ -from htsworkflow.frontend import settings - -import ftplib -import socket -import StringIO - - -def print_zpl(zpl_text, host=settings.BCPRINTER_PRINTER1_HOST): - """ - Sends zpl_text to printer - """ - ftp = ftplib.FTP(host=host, user='blank', passwd='') - ftp.login() - ftp.storlines("STOR printme.txt", StringIO.StringIO(zpl_text)) - ftp.quit() - - -def print_zpl_socket(zpl_text, host=settings.BCPRINTER_PRINTER1_HOST, port=settings.BCPRINTER_PRINTER1_PORT): - """ - Sends zpl_text to printer via a socket - """ - s = socket.socket() - # PORT 9100 is default for Zebra tabletop/desktop printers - # PORT 6101 is default for Zebra mobile printers - s.connect((host, port)) - s.sendall(zpl_text) - s.close() \ No newline at end of file diff --git a/htsworkflow/frontend/bcprinter/views.py b/htsworkflow/frontend/bcprinter/views.py deleted file mode 100644 index 60f00ef..0000000 --- a/htsworkflow/frontend/bcprinter/views.py +++ /dev/null @@ -1 +0,0 @@ -# Create your views here.