Generating a Postnet barcode

This first script is a new version (postnet2.py) which does without the complexity of Tkinter, by using 'valueDialog' instead. If you compare the two scripts, this one is much simpler. That one line:

S = scribus.valueDialog('Postnet Barcode','Enter your Zip or Zip+4')

replaces ALL the Tkinter material.

Both scripts will generate a Postnet barcode (US Postal Service) for a Zipcode that you enter. You may enter your numbers and include hyphens if you wish, since these and any other non-numeric characters are ignored.

The barcode is a series of lines drawn to USPS specifications, and in this script is placed vertically (meaning the lines themselves are horizonal), with the beginning of the barcode toward the top of the page at position X = 47, Y = 323 (points) [postnet.py uses X = 130, Y = 130] -- see the lines with comments 'Start X' and 'Start Y'.

To relocate the barcode, make the entire barcode a group, so that you can drag it wherever you like or use Properties to place it.

The scripts have been corrected to add "correction character" to the code, per USPS specs.

Here is postnet.py -- uses Tkinter to give you a requestor for the entry.