Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
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:
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
  #1  
Old August 17th, 2003, 03:53 AM
Sheridan Sheridan is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 1 Sheridan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SoS on Tkinter (psychological test)

Hello everyone,

First, sorry for my poor english (i am french..)

I try to develop an program with Tkinter. This program is a attentional psychological test witch is used for evaluate attention in schizophrenic patients.



Methodology:

3 references images are in top-center of window

in middle of windows, a series of 30 images (3 row of 10 images).

If image on the bottom is identical at the references images, the patient must click on the mouse.





I have make all interface code, but I need help for obtain the results of this task



If its possible, I want know the number of good responses (when a patient click on good image (same at reference image)) and the number of wrong responses(when patient has click on image who has different of reference image).



I want to know too, the number of bottom which has been analysed by the patient in 30 sec.



I am a newbie in python development, and i think with your help I will finish this program.



Summary Python code:



root = Tk()
root.title("jeu de carte")
larg, haut=root.winfo_screenwidth(), root.winfo_screenheight()
root.overrideredirect(1)
root.geometry("%dx%d+0+0" % (larg, haut))
frame1= Frame(root)
frame2= Frame(root)
frame1.grid(row=0, column=0)
frame2.grid(row=1, column=0)

#card list
liste_cartes = ['c:/carte1.gif',
'c:/carte2.gif',
'c:/carte3.gif',
'c:/carte4.gif',
'c:/carte5.gif',
'c:/carte6.gif',
'c:/carte7.gif',
'c:/carte8.gif',
'c:/carte9.gif',
'c:/carte10.gif']

#tirage aléatoire de l'image de la carte modèle
temp= liste_cartes
carte_modèle= random.choice(temp)

#affichage de l'image de la carte modèle dans le frame1
carte_modèle = PhotoImage (file=carte_modèle)
label1= Label(frame1, image=carte_modèle, borderwidth=5, relief=RIDGE)
label1.grid()


#Choix aléatoire des images de carte sur les boutons en frame 2
class ImButton(Button):
def __init__(self,master,liste,**args):
f=random.choice(liste)
self.p=PhotoImage(file=f)

#Création des Boutons
r=2
while r >= 0:
c=8
while c>=0:
b=ImButton(frame2,liste_cartes)
b.grid(row=r, column=c, padx= 3, pady= 3, ipadx=5, ipady= 5
r= r-1



root.mainloop()

__________________________________________________________________________


Thkx a lot for you r help

Reply With Quote
  #2  
Old August 18th, 2003, 12:18 AM
SolarBear's Avatar
SolarBear SolarBear is offline
onCsdfeu
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2003
Location: Canada
Posts: 100 SolarBear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 43 sec
Reputation Power: 6
Send a message via ICQ to SolarBear Send a message via MSN to SolarBear
Well I don't have much time to look on that, but I did translate the comments for our non-french speaking friends. just in case they're faster than me (and they are ):
Code:
root = Tk()
root.title("jeu de carte")
larg, haut=root.winfo_screenwidth(), root.winfo_screenheight()
root.overrideredirect(1)
root.geometry("%dx%d+0+0" % (larg, haut))
frame1= Frame(root)
frame2= Frame(root)
frame1.grid(row=0, column=0)
frame2.grid(row=1, column=0)

#card list
liste_cartes = ['c:/carte1.gif',
'c:/carte2.gif',
'c:/carte3.gif',
'c:/carte4.gif',
'c:/carte5.gif',
'c:/carte6.gif',
'c:/carte7.gif',
'c:/carte8.gif',
'c:/carte9.gif',
'c:/carte10.gif']

#random drawing of the card model's image
temp= liste_cartes
carte_modèle= random.choice(temp)

#display of image card model in frame1
carte_modèle = PhotoImage (file=carte_modèle)
label1= Label(frame1, image=carte_modèle, borderwidth=5, relief=RIDGE)
label1.grid()


#Random choice of card images for buttons on frame 2
class ImButton(Button):
def __init__(self,master,liste,**args):
f=random.choice(liste)
self.p=PhotoImage(file=f)

#Button creation
r=2
while r >= 0:
c=8
while c>=0:
b=ImButton(frame2,liste_cartes)
b.grid(row=r, column=c, padx= 3, pady= 3, ipadx=5, ipady= 5
r= r-1



root.mainloop()

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > SoS on Tkinter (psychological test)


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway