warning for unused packages/modules/objects

Discussion in 'Python' started by Daniel Fetchinson, Jun 27, 2008.

  1. How difficult would it be to implement a system in python that would
    warn if there are unnecessarily imported packages/modules/objects in
    the code? I mean that when developing some code one frequently imports
    stuff, deletes the import, changes stuff here and there, imports other
    stuff, later decides to change things and consequently delete the line
    with the import, etc, etc. As a result there can stay
    packages/modules/objects that are in the end not used. It would be
    great if python would issue a warning once the program finishes.

    Cheers,
    Daniel
    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
     
    Daniel Fetchinson, Jun 27, 2008
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. NETUser2004
    Replies:
    3
    Views:
    554
    John Saunders
    Feb 10, 2004
  2. Paul  Smith
    Replies:
    0
    Views:
    907
    Paul Smith
    Nov 18, 2003
  3. Kamilche

    Detect Unused Modules

    Kamilche, Oct 21, 2006, in forum: Python
    Replies:
    2
    Views:
    326
    Kamilche
    Oct 21, 2006
  4. Antoninus Twink

    Re: best way to suppress "unused" warning?

    Antoninus Twink, Apr 25, 2008, in forum: C Programming
    Replies:
    6
    Views:
    471
    Ian Collins
    Apr 29, 2008
  5. David Lyon
    Replies:
    19
    Views:
    784
    David Lyon
    Apr 24, 2009
  6. Rui Maciel
    Replies:
    14
    Views:
    2,987
    debra h
    Oct 1, 2010
  7. Noah Roberts

    Forced inclusion of "unused" objects

    Noah Roberts, Dec 8, 2010, in forum: C++
    Replies:
    13
    Views:
    658
    Joshua Maurice
    Dec 13, 2010
  8. Peter J. Holzer

    Warning about unused lexical variables

    Peter J. Holzer, Sep 4, 2007, in forum: Perl Misc
    Replies:
    5
    Views:
    270
    Peter J. Holzer
    Sep 7, 2007
Loading...