Código:
y este es el error que me arroja:from Tkinter import *
from tkFileDialog import *
from ttk import *
from numpy import *
from matplotlib.pyplot import *
def abrir():
archivo = askopenfilename(filetypes = [("Archivos de Texto",".txt")])
entry.insert(0, archivo)
ruta = entry.get()
lbl_ruta = Label(frame, text = ruta)
lbl_ruta.pack()
return archivo
def graficar():
x = arange(0, 10, 0.1)
y = 2*sin(4*x)-x**2+10*x
plot(x, y)
show()
opciones = (1,2,3)
root = Tk()
root.minsize(400, 300)
root.title("Prueba")
frame = Frame(root)
panel = Labelframe(frame, text = "Carga de archivo")
label = Label(panel, text = "Archivo de datos:")
entry = Entry(panel)
button = Button(frame, text = "Examinar...", command = abrir)
combo = Combobox(panel, values = opciones)
grafica = Button(frame, text = "Graficar")
lbl = Label (panel, text=combo.get())
frame.pack()
panel.pack(in_ = frame, side = TOP, pady = 5, padx = 10)
label.pack(pady = 5, padx = 10)
entry.pack(pady = 5, padx = 10)
button.pack(pady = 5, padx = 10)
combo.pack(pady = 5, padx = 10)
grafica.pack(pady = 5, padx = 10)
lbl.pack(pady = 5, padx = 10)
combo.current(0)
root.mainloop()
Código:
estoy compilando con Python 2.7 Traceback (most recent call last):
File "/home/osvaldo/Escritorio/Proyecto/nueva.py", line 31, in <module>
button = Button(frame, text = "Examinar...", command = abrir)
TypeError: __init__() got an unexpected keyword argument 'text'



