Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Blank TK Window

Reply
Thread Tools

Blank TK Window

 
 
Shamefaced
Guest
Posts: n/a
 
      07-17-2012
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()
 
Reply With Quote
 
 
 
 
woooee
Guest
Posts: n/a
 
      07-17-2012
On Jul 17, 9:32*am, Shamefaced <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
blank CD-R and blank DVD-R not recognized by Vista 64 Ultimate =?Utf-8?B?R3JlZyBLaXJrcGF0cmljaw==?= Windows 64bit 13 11-07-2007 12:23 PM
window to window communication (window.opener) Andrew Bewley via DotNetMonster.com ASP .Net 0 02-03-2005 12:59 PM
Show wireless networks window is blank Bob Wilcox Wireless Networking 0 01-06-2005 02:09 AM
window.location -- in a blank window.... Frances Del Rio Javascript 12 07-26-2004 03:13 PM



Advertisments