Skip to content

Commit

Permalink
open vis immediately when running color patches
Browse files Browse the repository at this point in the history
  • Loading branch information
drewrey committed Jun 3, 2016
1 parent 10ed199 commit a921593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/ColorPatches/color_patches/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
handles the definition of the canvas parameters and
the drawing of the model representation on the canvas
"""

import webbrowser

from mesa.visualization.modules import CanvasGrid
from mesa.visualization.ModularVisualization import ModularServer
Expand Down Expand Up @@ -46,3 +46,5 @@ def color_patch_draw(cell):
server = ModularServer(ColorPatchModel,
[CANVAS_ELEMENT], "Color Patches",
GRID_ROWS, GRID_COLS)

webbrowser.open('http://127.0.0.1:8888') # TODO: make this configurable

0 comments on commit a921593

Please sign in to comment.