Exemplo n.º 1
0
 def save_output():
     global output
     from tkFileDialog import asksaveasfilename as save
     filename = save(defaultextension='.txt')
     file_io = open(filename,"w")
     file_io.write(output)
     file_io.close()
     output = ''
     showinfo("File Saved",("File successfully saved as %s" %filename))
Exemplo n.º 2
0
 def save_output():
     global output
     from tkFileDialog import asksaveasfilename as save
     filename = save(defaultextension='.txt')
     file_io = open(filename, "w")
     file_io.write(output)
     file_io.close()
     output = ''
     showinfo("File Saved", ("File successfully saved as %s" % filename))
Exemplo n.º 3
0
 def save_graph():
     import ImageGrab #windows only, for now
     from tkFileDialog import asksaveasfilename as save
     canvas = turtle.getscreen().getcanvas()
     turtle.update()
     turtle.listen()
     canvas.update()
     x0 = canvas.winfo_rootx()
     y0 = canvas.winfo_rooty()
     x1 = x0 + canvas.winfo_width()
     y1 = y0 + canvas.winfo_height()
     turtle.listen()
     image = ImageGrab.grab((x0,y0, x1,y1))
     filename = save(defaultextension='.png')
     image.save(filename, "PNG")
     showinfo("File Saved",("File successfully saved as %s" %filename))
Exemplo n.º 4
0
 def save_graph():
     import ImageGrab  #windows only, for now
     from tkFileDialog import asksaveasfilename as save
     canvas = turtle.getscreen().getcanvas()
     turtle.update()
     turtle.listen()
     canvas.update()
     x0 = canvas.winfo_rootx()
     y0 = canvas.winfo_rooty()
     x1 = x0 + canvas.winfo_width()
     y1 = y0 + canvas.winfo_height()
     turtle.listen()
     image = ImageGrab.grab((x0, y0, x1, y1))
     filename = save(defaultextension='.png')
     image.save(filename, "PNG")
     showinfo("File Saved", ("File successfully saved as %s" % filename))