Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 27th, 2003, 09:09 AM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 10
Unhappy Tkinker problem :(

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!

Reply With Quote
  #2  
Old August 27th, 2003, 10:43 AM
percivall percivall is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Posts: 133 percivall User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 10
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.

Reply With Quote
  #3  
Old August 27th, 2003, 10:49 AM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 10
Oh, ok. I'll do that next time.

Reply With Quote
  #4  
Old August 27th, 2003, 11:45 AM
sacrilege sacrilege is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2002
Location: Norwich, UK
Posts: 53 sacrilege User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 9 h 1 m 53 sec
Reputation Power: 11
Code:
from Tkinker import *


Shouldn't that be Tkinter? I dunno, maybe there's some variant of Tkinter called Tkinker, but I doubt it.

Reply With Quote
  #5  
Old August 27th, 2003, 01:38 PM
Baltor's Avatar
Baltor Baltor is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 67 Baltor User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 41 m
Reputation Power: 10
OMG, I am a moron.
Thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Tkinker problem :(

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap