Module ImportFrom alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler body ImportFrom alias Import alias Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Num Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str TupleLoad Str NameLoad NameLoad TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str NameLoad NameLoad TupleLoad Str NameLoad NameLoad TupleLoad Str Str Str TupleLoad Str NameLoad NameLoad TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad NameLoad Str Str TupleLoad NameLoad Str Str TupleLoad Str TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad Str NameLoad NameLoad TupleLoad Str Str Str TupleLoad Str Str Str TupleLoad NameLoad Str Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Str Str Str ClassDef bases NameLoad body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index Str AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Str Str body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign NameStore Num While NameLoad body Expr Yield TupleLoad NameLoad NameLoad AugAssignAdd NameStore Num Assign NameStore BinOpDiv BinOpMult BinOpMult NameLoad Num BinOpSub NameLoad Num Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareEq NameLoad Num body Return Num Assign NameStore Call NameLoad While NameLoad body Assign TupleStore NameStore NameStore Call NameLoad NameLoad If CompareLt NameLoad NameLoad body Return BinOpSub NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareNotIn NameLoad NameLoad body Raise Call NameLoad Str Return SubscriptLoad NameLoad Index NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Num Assign NameStore NameLoad With Call NameLoad NameLoad NameStore body For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad body If CompareNotIn NameLoad SubscriptLoad NameLoad Slice Call NameLoad NameLoad body Assign NameStore NameLoad orelse If BoolOpAnd NameLoad CompareIn NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore Str If BoolOpAnd NameLoad Call AttributeLoad NameLoad attr NameLoad body Pass orelse If BoolOpAnd NameLoad UnaryOpNot NameLoad body AugAssignAdd NameStore Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Assign NameStore ListLoad For TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad body For NameStore NameLoad body If Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body TryExcept body Expr Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Continue Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Slice Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Num AugAssignAdd SubscriptStore NameLoad Index NameLoad Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Return DictComp NameLoad BinOpDiv SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str With Call NameLoad NameLoad Str NameStore body Expr Call NameLoad NameLoad keyword NameLoad For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad SubscriptLoad NameLoad Index NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict With Call NameLoad NameLoad NameStore body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr For NameStore NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Num If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body AugAssignDiv SubscriptStore NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad Expr Call NameLoad NameLoad NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad Assign NameStore DictComp NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore DictComp NameLoad Call NameLoad SubscriptLoad NameLoad Index NameLoad comprehension NameStore NameLoad Assign NameStore Str For NameStore Call NameLoad NameLoad body TryExcept body If CompareLt SubscriptLoad NameLoad Index NameLoad SubscriptLoad NameLoad Index NameLoad body AugAssignAdd NameStore Call AttributeLoad Str attr ListLoad Str Call NameLoad SubscriptLoad NameLoad Index NameLoad Str NameLoad Str handlers ExceptHandler type NameLoad body Pass If NameLoad body Assign NameStore BinOpAdd Str NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Str Expr Call AttributeLoad NameLoad attr Expr Call NameLoad NameLoad NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str Expr Call AttributeLoad NameLoad attr Str Str keyword Str keyword Num keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Assign NameStore Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad Str SubscriptLoad NameLoad Index NameLoad orelse If AttributeLoad NameLoad attr body Expr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad orelse TryExcept body Assign TupleStore NameStore NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Num Expr Call NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A __future__ print_function N/A sys N/A os N/A N/A tkinter * N/A N/A N/A Tkinter * N/A argparse N/A C_EQUIV_KLOC N/A Ada C C# C++ Clean Clojure Erlang F# Fortran Go Haskell Java JavaScript Lisp Lua Mozart/Oz OCaml Pascal Perl PHP Python Scheme Ruby Smalltalk 2.321176 1 1.250588 1.694118 0.9811765 1.268824 0.9876471 0.9411765 1.137647 0.8235294 1.356471 1.458824 0.5494118 1.857647 0.6529412 0.6576471 1.022353 1.197647 0.5270588 0.5682353 0.7364706 0.9376471 0.4941176 0.8682353 N/A COMMENT_SYNTAX N/A Ada C C# C++ Clojure Erlang F# Fortran Go Haskell Java JavaScript Lisp Lua OCaml Pascal Perl PHP Python Scheme Ruby Smalltalk N/A -- None None N/A // /* */ N/A // /* */ N/A // /* */ N/A ; None None N/A % None None N/A // (* *) N/A C None None N/A // /* */ N/A -- {- -} N/A // /* */ N/A // /* */ N/A ; #| |# N/A -- --[[ --]] N/A None (* *) N/A None (* *) N/A # N/A =begin =for =cut N/A // /* */ N/A # None None N/A ; #| |# N/A # =begin =end N/A None " " N/A EXTENSIONS N/A .adb .c .cs .cpp .clj .erl .fs .f .go .hs .java .js .lisp .lua .ml .pas .pl .php .py .scm .rb .st Ada C C# C++ Clojure Erlang F# Fortran Go Haskell Java JavaScript Lisp Lua OCaml Pascal Perl PHP Python Scheme Ruby Smalltalk N/A SCORE_FILE N/A N/A N/A os path join N/A N/A os getenv RED_SPIDER_ROOT work level_up scores LanguageError N/A ValueError N/A N/A The exception raised when a language is not supported N/A LevelUpWindow N/A Frame N/A N/A A window displaying a congratulatory message upon a level up event create_widgets N/A N/A self message button_text N/A N/A N/A N/A self TEXT N/A Label self N/A N/A N/A self TEXT N/A text message N/A N/A N/A N/A self TEXT pack N/A N/A self BUTTON N/A Button self N/A N/A N/A self BUTTON N/A text button_text N/A N/A N/A self BUTTON N/A command N/A self quit N/A N/A N/A N/A self BUTTON pack N/A __init__ N/A N/A self master message button_text N/A N/A N/A N/A N/A Frame __init__ self master N/A N/A N/A self pack N/A N/A N/A self create_widgets message button_text N/A N/A make_level_generator N/A N/A N/A N/A N/A Yields the number of C-equivalent kLOCs needed to advance to the next
    level.

     N/A xp 0 N/A level 1 N/A True N/A N/A N/A N/A level xp N/A level 1 N/A xp N/A N/A N/A level 1000 N/A level 1 8 N/A level N/A N/A score N/A N/A N/A Given a value in C-equivalent LOCs, returns the level. N/A N/A score 0 N/A N/A 0 N/A l_gen N/A make_level_generator N/A True N/A N/A N/A level xp N/A next l_gen N/A N/A score xp N/A N/A N/A level 1 N/A language N/A N/A filename N/A N/A N/A Gets the language which the source code file filename was written in
    based on its extension.

     N/A N/A name ext N/A N/A N/A os path splitext filename N/A N/A ext EXTENSIONS N/A N/A N/A LanguageError Error 1: file is not source code or language isnot supported. N/A N/A EXTENSIONS N/A ext N/A line_count N/A N/A filename N/A N/A N/A Returns a count of the number of lines in the file, not counting
    comments or blank lines, for supported source code files.

     N/A lang N/A language filename N/A N/A comment begin_block_comment end_block_comment N/A COMMENT_SYNTAX N/A lang N/A count 0 N/A is_comment False N/A N/A open filename source N/A N/A line source N/A N/A line N/A N/A line strip N/A N/A begin_block_comment N/A N/A line startswith begin_block_comment N/A N/A N/A end_block_comment N/A line N/A N/A len begin_block_comment N/A N/A is_comment True N/A N/A N/A is_comment N/A end_block_comment line N/A N/A is_comment False N/A line N/A N/A comment N/A N/A line startswith comment N/A N/A N/A N/A N/A line N/A is_comment N/A N/A count 1 N/A count N/A get_line_counts N/A N/A root_folder N/A N/A N/A Recurses through the root directory, looking for source files of the
    supported languages. Returns a dictionary of the line counts of all such
    files, less comments and blank lines. Ignores files in hidden directories.

     N/A line_counts N/A N/A file_list N/A N/A N/A root sub_folders files N/A N/A os walk root_folder N/A N/A folder sub_folders N/A N/A N/A N/A folder startswith . N/A N/A N/A N/A sub_folders remove folder N/A source_file files N/A N/A N/A N/A N/A language source_file N/A N/A N/A LanguageError N/A N/A N/A file_path N/A N/A N/A os path join N/A root N/A N/A len root_folder source_file N/A root_folder_path N/A N/A N/A os path abspath root_folder N/A N/A N/A N/A os path isabs file_path N/A N/A file_path N/A file_path N/A 1 N/A N/A N/A file_list append N/A N/A N/A os path join root_folder_path file_path N/A source_file file_list N/A N/A lang N/A language source_file N/A N/A N/A line_counts setdefault lang 0 N/A N/A line_counts N/A lang N/A line_count source_file N/A line_counts N/A get_scores N/A N/A root_folder N/A N/A N/A Like get_line_counts, only it normalizes the line counts according to the
    C_EQUIV_KLOC table.

     N/A counts N/A get_line_counts root_folder N/A N/A lang N/A N/A counts N/A lang N/A C_EQUIV_KLOC N/A lang N/A lang counts N/A update_score_file N/A N/A line_counts score_file head N/A N/A N/A Writes a table of line counts to the score_file. The head argument will
    typically be used to prepend the default directory to the score file.

     N/A N/A open score_file w sf N/A N/A N/A print head file sf N/A lang N/A sorted line_counts N/A N/A N/A print lang N/A line_counts N/A lang file sf N/A read_score_file N/A N/A score_file N/A N/A N/A Reads the counts of lines printed to a score_file by the
     udate_score_file command. Returns a dictionary of language scores.

      N/A line_counts N/A N/A N/A open score_file sf N/A N/A root_dir N/A N/A N/A N/A sf readline strip N/A line sf N/A N/A N/A lang score N/A N/A line split N/A score N/A float score N/A N/A line_counts N/A lang score N/A N/A root_dir line_counts N/A initialize_score_file N/A N/A root_dir score_file N/A N/A N/A Makes a table of line counts in C-equivalent KLOCs and writes it
    to the score_file.

     N/A work_dir N/A N/A N/A N/A os path split score_file N/A 0 N/A N/A N/A N/A N/A os path exists work_dir N/A N/A N/A N/A os makedirs work_dir N/A line_counts N/A get_line_counts root_dir N/A lang line_counts N/A N/A N/A line_counts N/A lang N/A C_EQUIV_KLOC N/A lang N/A N/A update_score_file line_counts score_file head N/A N/A N/A os path abspath root_dir N/A update_scores N/A N/A score_file N/A N/A N/A Gets the current scores from the score file, updates them and raises a
    congratulatory message if a level-up has occured.

     N/A N/A root_folder old_scores N/A read_score_file score_file N/A old_levels N/A lang N/A level N/A old_scores N/A lang N/A lang old_scores N/A new_scores N/A get_scores root_folder N/A new_levels N/A lang N/A level N/A new_scores N/A lang N/A lang new_scores N/A congrats N/A lang N/A sorted old_levels N/A N/A N/A N/A N/A N/A old_levels N/A lang N/A new_levels N/A lang N/A N/A congrats N/A N/A join N/A You have advanced to level  N/A str N/A new_levels N/A lang  in  lang !
 N/A N/A N/A KeyError N/A N/A N/A congrats N/A N/A congrats N/A Congratulations!

 congrats N/A root N/A Tk N/A window N/A LevelUpWindow root message congrats button_text Hooray! N/A N/A N/A root mainloop N/A N/A update_score_file new_scores score_file head N/A N/A N/A os path abspath root_folder N/A main N/A N/A N/A N/A N/A parser N/A N/A argparse ArgumentParser description Track your coding experience N/A N/A N/A parser add_argument -i --initialize action store nargs 1 dest init help Initialize a score file for the specified folder N/A N/A N/A parser add_argument -l --line-counts action store nargs 1 dest count help Show the code line counts for the directory N/A args N/A N/A parser parse_args N/A N/A args count N/A N/A counts N/A get_line_counts N/A N/A args count N/A 0 N/A lang N/A sorted counts N/A N/A N/A print lang :  N/A counts N/A lang N/A N/A N/A args init N/A N/A N/A initialize_score_file N/A N/A args init N/A 0 SCORE_FILE N/A N/A N/A N/A N/A root_dir scores N/A read_score_file SCORE_FILE N/A N/A N/A IOError N/A N/A N/A print Score file not found. Call 'level_up -i <directory>' to initialize a score folder, or 'level_up -h' for help N/A N/A N/A sys exit 0 N/A N/A update_scores SCORE_FILE N/A N/A N/A __name__ __main__ N/A N/A N/A main