Привет всем у меня проблема с копи паст .
Вродь что-то навоял но ….
Не судите строго ! За любую помощ спасибо .
# -*- coding: cp1251 -*-
from Tkinter import *
import tkFileDialog as fd
import copy
def callback():
print “called the callback!”
def openFile():
s = fd.askopenfilename()
print s
def exitwindow( self ) :
d = fd.askexit(s)
print d
def copy(x):
#x = copy.copy(x) # make a shallow copy of y
#x = copy.deepcopy(x)
a = [,,]
b = copy.copy(a)
c = copy.deepcopy(a)
root = Tk()
#root = Tkinter.Tk().withdraw() test1
# create a menu
menu = Menu(root)
root.config(menu=menu)
filemenu = Menu(menu)
menu.add_cascade(label=u“Меню”, menu=filemenu)
filemenu.add_command(label=u“Новий файл”, command=callback)
filemenu.add_command(label=u“Відкрити файл”, command=openFile)
#filemenu.add_separator()
filemenu.add_command(label=“Quit”, command=root.destroy)
filemenu = Menu(menu)
menu.add_cascade(label=“Edit”, menu=filemenu)
filemenu.add_command(label=“Copy”, command=copy)
#filemenu.add_command(label=“Past”, command=root.past)
filemenu = Menu(menu)
menu.add_cascade(label=u“Про нас”, menu=filemenu)
filemenu.add_command(label=u“Про програму”, command=callback)
#filemenu.add_separator()
filemenu.add_command(label=u“Можливості”, command=callback)
frame = Frame(root)
frame.grid()
btn = Button(frame, text=u“В меню”)
btn.grid(row=0, column=1)
txt = Text()
txt.grid(row=1, column=0)
root.mainloop()