Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Importing classes?
#11
i have used
subprocess.Popen('afairesh.py', shell=True)
to open the module upon button click. Still,searching for the previous issue though
Reply
#12
No, use an import. I can't see the code you currently have, so I can't help you with the NameError on root. Check what line the error is for. Check that root has either been defined by assignment in that part of the code, or passed as a parameter to the function or method that line of code is in.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pygame importing classes Padalinkiller1 2 3,789 Nov-15-2017, 02:08 PM
Last Post: Padalinkiller1
  Problems with importing classes in different folder Xeraphim 3 3,392 Nov-08-2017, 03:20 PM
Last Post: Larz60+
  Using classes? Can I just use classes to structure code? muteboy 5 5,066 Nov-01-2017, 04:20 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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