Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 160799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T11:05:57+00:00 2026-05-11T11:05:57+00:00

I hav codes eg1.py , eg2.py , eg3.py eg3.py imports eg2.py which in turn

  • 0

I hav codes eg1.py , eg2.py , eg3.py eg3.py imports eg2.py which in turn imports eg1.py

When i run eg3.py for first time everything is fine If i import it again and again only eg3.py runs

I need a solution for this.

I will code eg3.py in such a way that :

while(1):     import eg2.py 

Where I went wrong.Please give me a solution.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T11:05:57+00:00Added an answer on May 11, 2026 at 11:05 am

    Do you want to execute the code in eg2.py when you import it? That is not a good solution. You should have a function containing your code in eg2.py and then execute this function in your while loop.

    In eg2.py:

    def my_func():     # do useful stuff     pass 

    In eg3.py

    import eg2 while True:     eg2.my_func() 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i hav a piece of code in which i have been comparing 2D and
I hav used the following code to display a result and time elapsed to
I hav an app that i just did an update on and uploaded, everything
I hav created a lib which reads an XAML file and generates a HUD
hi i hav a code like this in the end i m getting error
I hav used uigraphics cgcontext to draw line on touch...but my line is not
If using subsonic, i know you hav to close a datareader. but what if
I hav to save the values of NSUserDefault to the Array,and later on have
I'm writing a small utility which is supposed to launch several commands in parallel
I hav desgined a form of personal information for my website but the input

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.