<div dir="ltr">Thanks for the advices, I need now one scrollbar to roll under screen, I created the scrollbar but cant roll, please help me on this.<br><br><a href="http://pastebin.com/L6XWY6cm">http://pastebin.com/L6XWY6cm</a><br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/4/2 Jason Swails <span dir="ltr"><<a href="mailto:jason.swails@gmail.com" target="_blank">jason.swails@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_default" style>Please keep response replies to the Python list (e.g., use 'reply all' or just send the email to python-list).</div><div class="gmail_extra"><br></div>
<div class="gmail_extra"><div style class="gmail_default">Also, you should tell people what Python version you are using. I assume you are using Python 2 since Tkinter was renamed to tkinter in Python 3.</div>
<div style class="gmail_default"><br></div><div style class="gmail_default">Finally, do not top-post.  Type your responses inside the body of the email you are responding to.  That gives people context for your responses.</div>

<div style class="gmail_default"><br></div><div class="gmail_quote"><div><div class="h5">On Tue, Apr 2, 2013 at 11:48 AM, Renato Barbosa Pim Pereira <span dir="ltr"><<a href="mailto:renato.barbosa.pim.pereira@gmail.com" target="_blank">renato.barbosa.pim.pereira@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Sorry for my inconsistence:<br><br></div><div>I need a textbox to get one number and pass for variable called numero with one click of button. Thanks .<br>

</div><div><br></div>I have this:<br><br>import numpy as np<br>
import matplotlib.pyplot as plt<br>from Tkinter import *<br>import tkMessageBox<br><br>prefixo = "vetor"<br>numero = 10<br>numeroVetores = 0<br><br>def makeWidgets(numero):<br>    global entries<br>    window = Tk()<br>


    window.title('Vetores')<br>    form = Frame(window)<br>    form.pack()<br>    entries = {}<br>    for ix in range(numero):<br>        label = "%s %s" % (prefixo , ix + 1)<br>        lab = Label(form, text=label)<br>


        ent = Entry(form)<br>        lab.grid(row=ix, column=0)<br>        ent.grid(row=ix, column=1)<br>        entries[label] = ent<br>        <br>        <br>        <br>    <br>        <br>    Button(window, text="Calcular",  command=calcular).pack(side=LEFT)<br>


    Button(window, text="Media",  command=media).pack(side=LEFT)<br><br>    <br><br>    return window<br><br><br><br>def pegavalores():<br>    valores = []<br>    for chave, entrada in sorted(entries.items()):<br>


        valores.append(entrada.get())<br><br>    return valores<br><br><br>def calcular():<br>    calcular = pegavalores()<br>    plt.plot(calcular)<br>    plt.show()<br><br>def media():<br>    media = pegavalores()<br>    elementos = len(media)<br>


    media = np.asarray(media, dtype=np.float64)<br>    valormedio = np.sum(media)/elementos<br>    tkMessageBox.showinfo("Media", valormedio)<br><br><br>window = makeWidgets(numero)<br>window.mainloop()<br></div>

</blockquote><div><br></div></div></div><div style class="gmail_default">I'm not sure exactly what you are trying to do.  My guess is that you want to get "numero" from user input.  Luckily, the tkSimpleDialog module contains a handy function that does just this: askinteger.  So add a call:</div>

<div style class="gmail_default"><br></div><div style class="gmail_default">numero = tkSimpleDialog.askinteger('Window Title', 'Please insert the number of input values you want')</div>
<div style class="gmail_default">window = makeWidgets(numero)</div><div style class="gmail_default">window.mainloop()</div><div style class="gmail_default"><br></div>
<div style class="gmail_default">I leave to you the task of bringing tkSimpleDialog into your namespace.</div><div style class="gmail_default"><br></div><div style class="gmail_default">
Good luck,</div><div style class="gmail_default">Jason</div><span class="HOEnZb"><font color="#888888"><div style class="gmail_default"></div></font></span></div><span class="HOEnZb"><font color="#888888">-- <br>Jason M. Swails<br>
Quantum Theory Project,<br>University of Florida<br>
Ph.D. Candidate<br><a href="tel:352-392-4032" value="+13523924032" target="_blank">352-392-4032</a>
</font></span></div></div>
</blockquote></div><br></div>