minor fixes

wip dialogue fixed
This commit is contained in:
tchemn
2018-05-18 02:18:03 +02:00
parent 23ed6be99b
commit f19bfb4710

View File

@@ -17,17 +17,20 @@ def generateFile(rows, lenghtOfRows):
content.append(generateRow(lenghtOfRows))
return content
def generateRow(lenghtOfRows):
row = ""
for z in range(0, lenghtOfRows):
row = row + str(randint(0, 9))
return row
def writeFile(content, x, o):
file = open("testdata/file" + str(x + o) + ".txt", "w")
for w in range(0, len(content)):
file.write(content[w] + "\n")
if __name__ == '__main__':
print("Hello World")
i = int(input("How many units would you like to generate? "))
@@ -51,13 +54,17 @@ if __name__ == '__main__':
globals()["p" + str(counter)].start()
print('thread number ' + str(counter) + ' just started')
counter = counter + 1
if counter == c: print(' ')
if counter == c: print('working, this might take a while')
counter = int(0)
while counter < c:
globals()["p" + str(counter)].join()
print('thread number ' + str(counter) + ' just finished')
counter = counter + 1
print('working, this might take a while')
print(" ")
print("Data is generated. Have fun!")
sec = time.time() - start_time
minutes = sec / 60