Blank TK Window

Discussion in 'Python' started by Shamefaced, Jul 17, 2012.

  1. Shamefaced

    Shamefaced Guest

    Hi,
    Any reason why a blank Tk() window opens up when I run my code:
    Code:
    for run in range(RUNS):
    waittime = Monitor2()
    checkouttime = Monitor2()
    totaltimeinshop = Monitor2()
    checkout_aisle = Simulation.Resource(AISLES)
    Simulation.initialize()
    cf = Customer_Market()
    Simulation.activate(cf, cf.run(), 0.0)
    Simulation.simulate(until=CLOSING)


    Histo = waittime.histogram(low=0.0, high=80, nbins=40)
    plt = SimPlot()
    plt.plotLine(Histo, xlab='Time (min)',ylab='Qty Customers',
    title="Wait Time",
    color="red", width=2,
    smooth='True')
    plt.mainloop()
     
    Shamefaced, Jul 17, 2012
    #1
    1. Advertising

  2. Shamefaced

    woooee Guest

    On Jul 17, 9:32 am, Shamefaced <> wrote:
    > Hi,
    > Any reason why a blank Tk() window opens up when I run my code:
    > Code:
    > for run in range(RUNS):
    >     waittime = Monitor2()
    >     checkouttime = Monitor2()
    >     totaltimeinshop = Monitor2()
    >     checkout_aisle = Simulation.Resource(AISLES)
    >     Simulation.initialize()
    >     cf = Customer_Market()
    >     Simulation.activate(cf, cf.run(), 0.0)
    >     Simulation.simulate(until=CLOSING)
    >
    >     Histo = waittime.histogram(low=0.0, high=80, nbins=40)
    >     plt = SimPlot()
    >     plt.plotLine(Histo, xlab='Time (min)',ylab='Qty Customers',
    >                       title="Wait Time",
    >                       color="red", width=2,
    >                       smooth='True')
    > plt.mainloop()


    1. you no longer have a toplevel/root "plt" once you replace "plt"
    with
        plt = SimPlot()
    2. the SimPlot widget in never placed in Tkinter. This is usually
    done with pack() or grid()

    So start out with a Tkinter tutorial so you understand the basics.
     
    woooee, Jul 17, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joakim G.

    Blank Applet Window on startup?

    Joakim G., Oct 5, 2003, in forum: Java
    Replies:
    0
    Views:
    625
    Joakim G.
    Oct 5, 2003
  2. =?Utf-8?B?TWlrZSBDb2xsaW5z?=

    Blank IE Window

    =?Utf-8?B?TWlrZSBDb2xsaW5z?=, Oct 10, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    338
    =?Utf-8?B?TWlrZSBDb2xsaW5z?=
    Oct 10, 2006
  3. Replies:
    0
    Views:
    283
  4. Michael
    Replies:
    4
    Views:
    140
    Adrienne
    Aug 6, 2003
  5. Frances Del Rio

    window.location -- in a blank window....

    Frances Del Rio, Jul 22, 2004, in forum: Javascript
    Replies:
    12
    Views:
    813
    Grant Wagner
    Jul 26, 2004
Loading...

Share This Page