Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- # --*-- coding:utf-8 --*--
- #create (large)tooltable Linuxcnc for testing
- import random
- Tools = 250
- toolFileName = "IR500.tbl"
- tfile = open(toolFileName, "w")
- t = 1
- r = random.uniform(0, 18)
- while (t <= Tools):
- z = round(random.uniform(0, 50),2)
- d = round(random.uniform(6, 18),2)
- string = ['T',str(t),' ','P',str(t),' ','Z',str(z) ,' ','D',str(d) ,' ',';tool',str(t),'\n']
- j=''.join(string)
- tfile.write(j)
- t += 1
- tfile.close()
Add Comment
Please, Sign In to add comment