Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------------------------------------+
- | For use click the mouse and move it |
- +-------------------------------------+
- # -*- coding: utf-8 -*-
- #!/usr/bin/env python3
- from tkinter import *
- from random import *
- import math
- chk=0
- def mous(event):
- global chk
- x0=event.x
- y0=event.y
- if chk==1:
- c.create_oval(x0,y0,x0+10,y0+10,outline=choice(["lightblue","blue","darkblue"]))
- c.update()
- else:
- pass
- def cl(event):
- c.delete("all")
- def go(event) :
- global chk
- if chk==0:
- chk=1
- else:
- chk=0
- app=Tk()
- app.title(chr(9960)*3+" xSpace version 0.0.1 beta "+chr(169)+" 2017, coded by 5n6r "+chr(9960)*3)
- app.geometry("600x400")
- app.resizable(0,0)
- c=Canvas(app,width=599,heigh=399,bg="black",cursor = "pencil")
- c.bind("<Motion>",mous)
- c.bind("<Button-3>",cl)
- c.bind("<Button-1>",go)
- c.pack()
- app.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment