1. ebo
  2. pyfuzz


ebo  committed bc0fdba

Added some documentation

  • Participants
  • Parent commits 26a4306
  • Branches default

Comments (0)

Files changed (2)


View file
+pyfuzz is a random program generator for python. It was developed to test the JIT compiler of Unladen Swallow.
+Website and repository:
+Execute pgen-example.py to generate a new random program and output it to stdout.
+Execute pygen-example.py to test a python binary. You must specify a base and a test binary using the -b and -t commandline options. 

File pygen-example.py

View file
 from pgen import *
+import sys
 import subprocess
 import time
 from optparse import OptionParser
 def _main():
+    default_binary = sys.executable
     parser = OptionParser()
-    parser.add_option("-b", "--base", type="string", dest="base", default="python", help="Base python binary. Default: python")
+    parser.add_option("-b", "--base", type="string", dest="base", default=default_binary, help="Base python binary. Default: "+default_binary)
     parser.add_option("-B", "--base-args", type="string", dest="baseargs", default="",
                         help="Additional arguments for base binary")
     parser.add_option("-t", "--test", type="string", dest="test", help="Python binary to test.")
     if not options.test:
         print "Please specifiy a test binary."
+        parser.print_help()
     rng = random.Random()