Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Pattern generator for a given length of fixed, random or running byte values

Project Description
Pattern Generator V1.0.0
Initial version

Generates a byte array of given length with fixed values, random data or running byte sequence.
A start offset, minimum and maximum value of the running byte sequence can be changed by parameters.
All pattern types support 2 bytes of pattern length in front which can be switched on and off.

Example:

patGen = PatternGenerator()
patGen.set_random(True, 10)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))

patGen.set_value(True, 1024, 0xaa)
data = patGen.get_data_pattern()
for i in data:
print(hex(i))

patGen.set_running_byte(False, True, 1, minValue=0x00, maxValue=0x1F)
for i in range(20):
print("Data",i+1)
data = patGen.get_data_pattern(numData = i+1)
for i in data:
print (hex(i))

V1.0.1
Bugfix: Running byte generator didn't generate a pattern of 128 bytes on special circumstances
Release History

Release History

This version
History Node

1.0.1

History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
Pattern_Generator-1.0.1.tar.gz (2.0 kB) Copy SHA256 Checksum SHA256 Source Oct 14, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting