is there a method for copying modules from a module in python 3?

When you import from another file, it runs the whole file. If there’s a part of the file you don’t want to be run, put it in an if __name__ == "__main__", like this:

if __name__ == "__main__":
    engine = sql.create_engine('sqlite:///../docs/database.db', echo=True)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top