Linux SoftwareProgrammingBug Trackingimport_checker 1.1

import_checker 1.1


import_checker checks Python programs for circular (or recursive) imports. Python is a fine programming language
Developer:   Walter de Jong
      more software by author →
Price:  0.00
License:   GPL (GNU General Public License)
File size:   8K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


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.

Example:

### 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.
    tags recursive import  recursive imports  import checker  

    Download import_checker 1.1


     http://www.ka.sara.nl/home/walter//import_checker/import_checker-1.1.tar.gz


    Authors software

    bbs100 3.0 (by Walter de Jong)
    bbs100 is a BBS in the style of DOC and/or YAWC

    import_checker 1.1 (by Walter de Jong)
    import_checker checks Python programs for circular (or recursive) imports.

    Python is a fine programming language


    Similar software

    import_checker 1.1 (by Walter de Jong)
    import_checker checks Python programs for circular (or recursive) imports.

    Python is a fine programming language

    Instant 0.8 (by Magne Westlie & Kent-Andre Mardal)
    Instant is a Python module that allows for instant inlining of C and C++ code in Python

    Extended attributes for Python 0.1.3 (by Manuel Amador)

    PyChecker 0.8.17 (by Neal Norwitz)
    PyChecker is a tool for finding bugs in python source code

    Shed Skin 0.0.15 (by Mark Dufour)
    Shed Skin is an experimental Python-to-C++ compiler

    pymad 0.5.4 (by Jamie Wilkinson)
    pymad is a Python module that allows Python programs to use the MPEG Audio Decoder library.

    pymad provides a high-level API, simil

    delicious python 0.3.3 (by regenkinder)
    delicious python lets you access the Web service of del.icio.us via its API through Python

    Python Macromolecular Library 0.98 (by Jay Painter)
    Python Macromolecular Library (mmLib) is a software toolkit and library of routines for the analysis and manipulation of macromolecul

    pydsc 0.2 (by Roman Yakovenko)
    pydsc is a Python documentation spell checker

    pydiction 0.5 (by Ryan Kulla)
    pydiction is a special dictionary file of Python modules for use with vim's completion feature.
    Pydiction.py is a program that gener


    Other software in this category

    Request Tracker 3.2 (by Jesse)
    Request Tracker (RT) is an enterprise-grade ticketing system which enables a group of people to intelligently and efficiently manage

    Mantis 1.1.0a2 (by Kenzaburo Ito)
    Mantis is a web-based bugtracking system

    Double Choco LatteBugzero 0.9.4.4 (by Michael Dean)
    Double Choco Latte is a GNU Enterprise package that provides basic project management capabilities, time tracking on tasks, call trac

    phpBugTracker 1.0.1 (by Slappy)
    phpBugTracker is meant to be a replacement for Bugzilla (one day)

    GForge 4.5.11 (by Tim Perdue)
    GForge is a Web-based collaborative development environment

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags