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 7529749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:44:09+00:00 2026-05-30T04:44:09+00:00

Anyone know of a library/script that can scan source directories and detect circular imports?

  • 0

Anyone know of a library/script that can scan source directories and detect circular imports?

  • 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. Editorial Team
    Editorial Team
    2026-05-30T04:44:10+00:00Added an answer on May 30, 2026 at 4:44 am

    I do not know any tool outright, but there are a couple of ways I can think of right now that will get you this data.

    Make the Interpreter Work for You

    For every module you have, create a stub module that imports it, and then run this module with

    $ python -v stub_module.py
    

    This only works if you do not rely on sys.path hackery and your modules do not have dangerous side effects when imported (both very dubious features FWIW). You will get the transitive import closure, but detecting circular imports with this should be straightforward.

    Use logilab.astng

    With logilab.astng,it is easy to extract all direct imports of your modules (look for nodes of type logilab.astng.nodes.From and logilab.astng.nodes.Import). Once you have the list of direct imports of all modules, create the import graphs and look for cycles.

    Again, this only works only if you do not use sys.path hacks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone know of a library that handles parsing arguements passed from the command line
Does anyone know of a library for RDP that's written in C or Objective-C
Does anyone know of a library that would allow me to manipulate Flex DOM
Does anyone know of a library that works with Ruby 1.9.1 on Rails 3
Does anyone know of a library that enables you to run an application inside
Anyone know of a JS library that will allow me to syntax highlight a
Does anyone know of a universal, one stop PNGFix script that isn't dependent on
Does anyone know if there is any language detection script/library available for javascript? I
Does anyone know where I can find a library of common but difficult (out
Does anyone know of a PHP FTP library/function that is capable of downloading whole

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.