Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global not working why?
#12
I will stop and look over my code. This is how it is laid out and should work to the point where I am now.

Program loads and presents a GUI.
1.On that there is a text box, user enters race date to handicap.
2. User clicks a load race files button.
3. Program goes to race folder and reads the csv file and selects the fields needed and then writes that to a file.
4. user then selects a race track and clicks on that button. The track name associated with that button loads into variable.
5. User then clicks on a race number button which assigns the associated number to a variable.
6. At that point the program goes to the file and pulls the race data. Def load race to handi
7. In that function the program calls get scratches. A scratch window opens with list of horses in that race.
8. when the scratch window is closed after scratches are done or there are none, def complete form is called. The results of the scratch window is loaded from scratched into scratch_list.

And that is where I am. So everything up to now is all event driven. So in that last def I put a print statement for testing to make sure the state of each horse is recorded. Now I need to be able to access scratched list which I will use as a conditional to see if a horse info is loaded or skipped over.

I know very little about classes and my program logic is weak for sure. I have a complete working program I wrote in another language, but it is slow and limited. That's why I am trying to learn Python. I learn best by working on problems I am very interested in, Horse race handicapping in this case. I will watch some videos on classes and program design. Maybe that will help me.
Reply


Messages In This Thread
Global not working why? - by Milfredo - Oct-02-2020, 07:29 AM
RE: Global not working why? - by ibreeden - Oct-02-2020, 08:08 AM
RE: Global not working why? - by Larz60+ - Oct-02-2020, 10:33 AM
RE: Global not working why? - by scidam - Oct-02-2020, 11:09 AM
RE: Global not working why? - by Milfredo - Oct-03-2020, 01:28 AM
RE: Global not working why? - by scidam - Oct-03-2020, 01:46 AM
RE: Global not working why? - by Milfredo - Oct-04-2020, 06:44 AM
RE: Global not working why? - by bowlofred - Oct-04-2020, 07:21 AM
RE: Global not working why? - by ndc85430 - Oct-04-2020, 10:48 AM
RE: Global not working why? - by hshivaraj - Oct-04-2020, 12:30 PM
RE: Global not working why? - by deanhystad - Oct-04-2020, 12:44 PM
RE: Global not working why? - by Milfredo - Oct-05-2020, 11:45 PM
RE: Global not working why? - by Larz60+ - Oct-06-2020, 12:29 AM
RE: Global not working why? - by Milfredo - Oct-06-2020, 02:37 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Global variables not working hobbyist 9 4,846 Jan-16-2021, 03:17 PM
Last Post: jefsummers
  Global variable does not seem to be global. Columbo 6 3,786 Jul-15-2019, 11:00 PM
Last Post: Columbo

Forum Jump:

User Panel Messages

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