Python Forum
Python, Tkinter. How to search a specific file in a folder
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python, Tkinter. How to search a specific file in a folder
#1
Hi everybody!!
I created a program using Tkinter that allows me to fill up a form with some details and write a text file to store all the details. Every file is named automatically using first and last name taken from the details inserted. I would like now to create a separate program that allows me to search in that folder a specific text file using first and last name as a key word for the search and I can't find something for this specific action. Any suggestions? Please keep in mind that I'm currently working with python 2. Thanks a lot for any help.
Reply
#2
It's difficult at best to determine what's needed without seeing code.
I'm guessing you want to import GUI script in second script so that you have access to it's methods.
Reply
#3
Hi! I haven't put any script because I don't have it yet. Basically want to have two separate programs: one that works as a GUI where I can insert all the details and the program write and save a text file with all the details that I have inserted. This program is already done. Now I would like to write a second GUI that allows me to have a search widget bar where I can recall one of those text file previously created using as a key word for the search the title of the file. At the moment I have to write from scratch the second GUI but I can't find the way to create such a "search widget".
Reply
#4
so if gui program is named gui.py
and second program is named processdata.py
in processdata.py, add line:
import gui
You will then be able to access methods from gui.py in processdata.py as gui.methodname
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Search data in treeview without search button TomasSanchexx 3 1,589 Aug-12-2023, 03:17 AM
Last Post: deanhystad
  [Tkinter] Button Plays Random .MP3 File From Folder blufacebaby 2 2,074 Feb-05-2021, 02:19 AM
Last Post: BashBedlam
  [Tkinter] Tkinter - I need to read file excel from GUI app to script file johnjh 0 10,710 Apr-17-2020, 08:14 PM
Last Post: johnjh
  tkinter search box DT2000 3 7,682 Apr-08-2020, 05:59 AM
Last Post: DT2000
  python file(.py) not working with my tkinter project DeanAseraf1 9 7,076 Mar-22-2020, 10:58 PM
Last Post: ifigazsi
  [Tkinter] add search bar = search for input in all computer directory francisco_neves2020 15 10,888 Apr-14-2019, 07:29 PM
Last Post: francisco_neves2020
  [WxPython] Any dialog that allow user to select file OR folder? buran 3 4,216 Apr-03-2019, 06:33 PM
Last Post: Yoriz
  [Tkinter] Problem with tkinter search widget poopcupine 1 2,669 Mar-25-2019, 08:24 AM
Last Post: Larz60+
  [Tkinter] THow to search a string in a file and display it in listbox by Tkinter mosavit 2 5,632 Jun-21-2017, 08:02 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020