|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
||||
|
||||
|
When I run this program:
Note: It's not finished yet ------------------------------ # Dice Roller Program # By Evan Patterson from Tkinker import * class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createWidgets() def createWidgets(self): # Buttons self.quitButton = Button ( self, text="Exit", ) command=self.quit() self.quitButton.grid(column=1,row=2) # Labels self.Label1 = Label ( self, text="# of Rolls", ) self.Label1(column=0, row=0) self.Label2 = Label ( self, text="# of Sides", ) self.Label2(column=1, row=0) self.Label3 = Label ( self, text="Results", ) self.Label3(column=2, row=0) # Entries self.Entry1 = Entry ( self, wdth=5) self.Entry1(column=0, row=1) self.Entry2 = Entry ( self, wdth=5) self.Entry2(column=1, row=1) # Instantiate the application class app = Application() app.master.title("Dice Roller") app.mainloop() --------------------------------------- It gives me the following error: ------------------------------------- File "C:\Python23\lib\site-packages\Pythonwin\pywin\framework\scriptutils.py", line 310, in RunScript exec codeObject in __main__.__dict__ File "C:\Python23\My Programs\Dice Roller.txt", line 4, in ? from TKinker import * ImportError: No module named Tkinker ------------------------------------ I can't figure out why, I mean, I have Tkinker. Does anyone know why this is happening? Thanks.
__________________
Before you criticize someone, walk a mile in their shoes, that way when you do criticize them, you're a mile away and you have their shoes! |
|
#2
|
|||
|
|||
|
It would be much easier to analyze your code if you put the code between code brackets, "[" then "code", then "]", and on the other side, "[", "/code", and "]". That would preserve the formatting of the code.
|
|
#3
|
||||
|
||||
|
Oh, ok. I'll do that next time.
|
|
#4
|
|||
|
|||
|
Code:
from Tkinker import * Shouldn't that be Tkinter? I dunno, maybe there's some variant of Tkinter called Tkinker, but I doubt it. |
|
#5
|
||||
|
||||
|
OMG, I am a moron.
Thanks. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Tkinker problem :( |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|