Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Circular import issue error in Tkinter python. I have two files , Driver.py and Log.py. In the driver file, I imported a class from Log

Circular import issue error in Tkinter python. I have two files , Driver.py and Log.py.

In the driver file, I imported a class from Log (from log import sign_in) so that the button in the driver can access the window in Log. In the same way, I imported Driver in my log.py (import Driver) so that a function I created in log.py can access objects in Driver like( driver.object()). Python responds with the expected error ("circular import error"). I attempted to solve the problem by searching the internet for solutions. I could not find a solution. I tried to create a THIRD_FILE.py that imports from both files, but it did not work. Probably, I need to improve my thirdfile and want to know how. Please, give a customized example using Tkinter and explain how third_file should be a solution or alternative solution. Thanks for your time.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions