Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • The tabnanny Module in python

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 470
    Comment on it

    tabnanny module helps us to check Python source files for

    With the help of tabnanny module we can checks Python source files for unclear indentation. If a tabs and spaces are mixed by a file in such a way that throws off indentation, no matter what tab size you're using, the nanny complains and variable.
    For example you can see below code.

    #!/usr/bin/python
    r1 = 10
    r2  = 20
    sum = vara + varb
    print "vara + varb = %d" % sum

    If you will try a correct file with tabnanny.py, then it will not complain as follows

    $tabnanny.py -v sum.py
    'sum.py': Clean bill of health.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: