Skip to content

JC3/imagewriter-ii

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

imagewriter-ii

This is a Python library for controlling the Apple ImageWriter II printer.

It is not a 100% complete command set, but includes a number of commonly used commands for printing text and images. If there are any additional commands you would like to see support for, feel free to post in the GitHub issues list.

This library currently does not support color ribbons.

Documentation does not exist yet so you will have to look at the code and the examples in imagewriter/tests.

Basic Usage

You construct an imagewriter.ImageWriterII with, at minimum, the name or path of the serial port the printer is attached to. You can do it like this:

printer = ImageWriterII("/dev/ttyUSB0")  # or say "COM2" on Windows, etc.
# do stuff
printer.close()

Or you can use it as a context manager, in which case close will be called automatically:

with ImageWriterII("/dev/ttyUSB0") as printer:
    ...

By default the printer is opened at 9600 baud but you can specify different baud rates with the baud keyword argument to the constructor, just make sure it matches the DIP switch settings on the printer.

(Un)license

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <https://unlicense.org/>

GitHub repository: https://github.com/JC3/imagewriter-ii/

About

Apple ImageWriter II printer control for Python.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages