Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def getBarcode(format, param={}):
	if format:
		format = str(format).lower()
		format = format.replace('-', '')
		format = format.replace(' ', '')
		if format=='code39':
			import Code39
			return Code39.Object(param)
		elif format=='code39ext':
			import Code39Ext
			return Code39Ext.Object(param)
		elif format=='code93':
			import Code93
			return Code93.Object(param)
		elif format=='code128':
			import Code128
			return Code128.Object(param)

		elif format in ['rm4cc', 'rm4scc']:
			import RM4CC
			return RM4CC.Object(param)

		elif format == 'upca':
			import UPCA
			return UPCA.Object(param)
		elif format == 'upce':
			import UPCE
			return UPCE.Object(param)
		elif format in ['ean13', 'ucc13','jan']:
			import EAN13
			return EAN13.Object(param)
		elif format == 'ean5':
			import EAN5
			return EAN5.Object(param)
		elif format in ['ean8', 'ucc8']:
			import EAN8
			return EAN8.Object(param)
	sys.stderr.write("Invalid format for barcode: " + str(format) + "\n")
        


src/s/p/Spherebot-Host-GUI-HEAD/InkscapePortable/App/Inkscape/share/extensions/render_barcode.py   Spherebot-Host-GUI(Download)
import inkex
import sys
from Barcode import getBarcode
 
class InsertBarcode(inkex.Effect):
	def effect(self):
		x, y = self.view_center
		object = getBarcode( self.options.type, {
			'text'     : self.options.text,
			'height'   : self.options.height,