last day (14 days later) » 

12:11 PM
1
A: Python search CSV file and return result in Tkinter

vinodfrom tkinter import * import csv master = Tk() b1 = StringVar() v1 = StringVar() v2 = StringVar() v3 = StringVar() a = Label(master, text="Player 1", font="Verdana 10 bold").grid(row=8, column=1, columnspan=2, pady=15) b = Label(master, text="Player Name").grid(row=9, column=1, sticky='w') c = La...

 
super, thanks a million. One more question. What if I have the same fields next to each other. And with 1 click on the button I want to have the details from both players?
 
@Wouter Sorry , I didn't get you.
 
now I have the results for 1 player. But lets put a "Player 2" next to it. When I press "Run" I want the results filled in from 2 players. Is this possible?
 
ofcourse. we can get it. add one more text widget beside it. enter player name in second text widget and hit "Run". using name in second text widget check for row if it matches just do the same.
or you asked within one text widget like "Novak Djokovic , Andy Murray" ? for this we need to separate player names and fetch results one by one for each player name.
 
I've updated my question with how I would like to have it
Hi
 
12:12 PM
hey
 
I've updated my question on how I would like my GUI to look like
 
so you want to enter input like this "player 1 player2" and get details of both players rite.
 
yes
 
if so we need some separator between two player names. comma(,) or and(&)
 
Can I not have 2 fields like in my edited GUI?
When you answered my question I had 1 field, with "Andy Murray". In the column next to it I would like to have a second player
Like this
from Tkinter import *
import csv

master = Tk()

b1 = StringVar()
v1 = StringVar()
v2 = StringVar()
v3 = StringVar()

b2 = StringVar()
v4 = StringVar()
v5 = StringVar()
v6 = StringVar()

a = Label(master, text="Player 1", font="Verdana 10 bold").grid(row=8, column=1, columnspan=2, pady=15)
b = Label(master, text="Player Name").grid(row=9, column=1, sticky='w')
c = Label(master, text="1st Service Percentage:").grid(row=10, column=1, sticky='w')
cc = Label(master, text="value", textvariable=v1)
d = Label(master, text="Points Won on 1st Serve: ").grid(row=11, column=1, sticky='w')
 
12:19 PM
oh I got it
lemme check and replay you back
*reply
 
Ok thank you. Sorry if I don't anwser straight away. My daughter just woke up :) But thanks a million in advance
 
got it
from tkinter import *
import csv

master = Tk()

b1 = StringVar()
v1 = StringVar()
v2 = StringVar()
v3 = StringVar()

a = Label(master, text="Player 1", font="Verdana 10 bold").grid(row=8, column=1, columnspan=2, pady=15)
b = Label(master, text="Player Name").grid(row=9, column=1, sticky='w')
c = Label(master, text="1st Service Percentage:").grid(row=10, column=1, sticky='w')
cc = Label(master, text="")
d = Label(master, text="Points Won on 1st Serve: ").grid(row=11, column=1, sticky='w')
dd = Label(master, text="")
here indentation problem. I will post one more answer you can copy and just run it.
 
12:48 PM
thx
 

last day (14 days later) »