An example of AsynQueue in action. Can be fun to play with if you have a multicore CPU. You will need the following packages, which you can get via pip install: weave (part of SciPy); numpy (part of SciPy); matplotlib; and of course asynqueue.

TODO: If you want to run with the Qt GUI (-g option), you also need qt4reactor and pyqt4.

Command line usage:

 mcmandelbrot
   [-d <description>] [-N <iterations>]
   [-o <imageFile>]
   [-g] [-s] [-a <aspect ratio>]
   Nx cr ci crPM [ciPM]

Writes PNG image to stdout unless -o is set, then saves it to imageFile. In that case, prints some stats about the multiprocessing computation to stdout.

To see an overview displayed with ImageMagick's display command:

 mcmandelbrot 2000 -0.630 0 1.4 1.2 |display

Write a detailed view to the image detail.png:

 mcmandelbrot -o detail.png 3000 -0.73249 +0.21653 0.0112
Function run

Call with:

def run(*args, **kw):

Call with:

 [-d, <description>,] [-N, <values>,]
 [-o, <imageFile>,]
 [-g,] [-s,]
 Nx, cr, ci, crPM, [ciPM]

Writes PNG image to stdout unless -o is set, then saves it to imageFile. In that case, prints some stats about the multiprocessing computation to stdout.

Options-as-arguments:

  • d: An endpoint description of a server running a wire.server.
  • s: Show image (TODO)
ParametersN_valuesInteger number of possible values for Mandelbrot points during iteration. Can set with the -N values arg instead.
ignoreReactorSet True to let somebody else start and stop the reactor.
API Documentation for AsynQueue, generated by pydoctor at 2022-11-17 13:13:24.