Python Forum
How to share a variable between two Python classes?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to share a variable between two Python classes?
#3
Dear DT2000,

thank you for your reply.

I wonder how i can connect class 1 (login-system) with class 2 (privacy terms)?

for example:

In class 1 i have defined an attribute called 'self.start_game = False' and in class 2 if the user presses the button 'OK', i want to adjust the value self.start_game in class 1.
Reply


Messages In This Thread
RE: How to share a variable between two Python classes? - by robin1992 - Nov-27-2019, 09:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How can import variable beteen classes in same module johnjh 1 529 Apr-19-2020, 09:41 PM
Last Post: deanhystad
  Scope of variable when using two classes AyJay 2 498 Jan-23-2020, 10:09 AM
Last Post: AyJay

Forum Jump:

User Panel Messages

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