import_checker checks Python programs for circular (or recursive) imports.. #Checks Python programs #Circular imports #Python checker #Import_checker #Checks #Python
import_checker checks Python programs for circular (or recursive) imports.
Python is a fine programming language. There is one horrendous thing with it though, that bites even the most experienced python programmers every now and then: the scope of variables.
We've been taught to use the keyword 'global', and heartily do so. Still, problems occur when running into a "recursive import" problem.
### program A ###
import B
var = 0
if __name__ == '__main__': var = 10 B.doit()
### module B ###
import A
def doit(): print A.var
### end of example ###
Module B will see A.var having value 0, even though in program A we assigned it a value of 10. Python is right and it is not a python bug, but it is $#@! confusing and it is being caused by the recursive import; A imports B, and B imports A.
The import_checker.py is a tool that detects recursive imports.
This problem only occurs for global variables in modules.
The best way of solving the problem is to put 'var' into a new module C, and import C from both A and B.
Requirements:
� Python
What's New in This Release:
� The Python source files are now read using the shlex lexical scanner.
import_checker 1.1
add to watchlist add to download basket send us an update REPORT- runs on:
- Linux
- filename:
- import_checker-1.1.tar.gz
- main category:
- Programming
- developer:
- visit homepage
4k Video Downloader 1.5.3.0080 Plus / 4.30.0.5655
Windows Sandbox Launcher 1.0.0
Context Menu Manager 3.3.3.1
Microsoft Teams 24060.3102.2733.5911 Home / 1.7.00.7956 Work
calibre 7.9.0
7-Zip 23.01 / 24.04 Beta
Zoom Client 6.0.3.37634
Bitdefender Antivirus Free 27.0.35.146
ShareX 16.0.1
IrfanView 4.67
- Bitdefender Antivirus Free
- ShareX
- IrfanView
- 4k Video Downloader
- Windows Sandbox Launcher
- Context Menu Manager
- Microsoft Teams
- calibre
- 7-Zip
- Zoom Client