From a86320aa1892f66b263372331cbc0bc939286ede Mon Sep 17 00:00:00 2001 From: Fisch Date: Sun, 1 Apr 2018 00:16:03 +0200 Subject: [PATCH] change multisuer mode parameters to command line arguments --- eh18-image.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eh18-image.py b/eh18-image.py index 6432f1c..b96e668 100644 --- a/eh18-image.py +++ b/eh18-image.py @@ -4,6 +4,7 @@ import time from PIL import Image from random import shuffle import numpy as np +import sys TCP_IP = '94.45.232.48' TCP_PORT = 1234 @@ -33,11 +34,13 @@ def randomnumber(pseed,pmin,pmax,v1,v2,v3): newseed=(int)(time.time()/60) seed=newseed -parts=2 #n users -user=1 #1..n +user=int(sys.argv[1]) #1..n +parts=int(sys.argv[2]) #n users + if __name__ == '__main__': + pixelcoords=[] for _x in range(width): for _y in range(height):