Commits

Anonymous committed dccef8e

Licence snippets & unused imports cleanup

Comments (0)

Files changed (24)

sneakylang/__init__.py

 
 """ SneakyLang: Extensible WikiFramework """
 
-__version__ = [0.3, "alpha", 4]
-__versionstr__ = "0.3_alpha4"
-
-###
-# SneakyLang: Extensible WikiFramework
-# Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/czechtile/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
+__version__ = [0, 3, 0, "final"]
+__versionstr__ = "0.3.0"
 
 from document import Document
 from expanders import expand
 from parser import parse
 from register import Register, RegisterMap
 from treebuilder import TreeBuilder
+
+__all__ = (
+    "Document", "Macro", "Register", "RegisterMap", "TreeBuilder",
+    "parse", "expand",
+)

sneakylang/document.py

 
 """ Default document macro/nodes """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/sneakylang/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
 import logging
 
 from macro import Macro

sneakylang/err.py

 """ SneakyLang-specific errors
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/czechtile/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
 class Error(Exception): pass
 
 class MacroCallError(Error):

sneakylang/expanders.py

 """ Expanders for nodes
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/czechtile/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
 from cgi import escape
 from err import *
 

sneakylang/macro.py

 # -*- coding: utf-8 -*-
 """ Macro superclass and default Document and Macro classes """
 
-import re
 import logging
 logging = logging.getLogger('sneakylang')
 
 from err import *
-import node
 from macro_caller import parse_macro_arguments
 
 class Macro(object):

sneakylang/macro_caller.py

 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-# Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/sneakylang/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
-""" Set of funcitons and constants
+"""
+Set of functions and constants
 needed to perform proper call when calling macros with
 extensive syntax ((macro_name argument argument))
 
 All those functions are meant to be overwritten by
 implementation and should be as forward-compatible as possible.
- """
+"""
 
 
-import re
 import logging
 
 from err import *

sneakylang/macro_hook.py

 Post- macro hooks are useful for rebuilding or inspecting tree
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-# Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/sneakylang/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
 class MacroHook(object):
     """ Main MacroHook class. Subclass this one to make real MacroHook """
     macro = None

sneakylang/node.py

 # -*- coding: utf-8 -*-
 
-""" Representation of nodes in Document
 """
-
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/czechtile/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
-
-import re
-import logging
+Representation of nodes in Document
+"""
 
 from expanders import *
 

sneakylang/parser.py

 # -*- coding: utf-8 -*-
 
-""" Parser transforming input stream to DOM
 """
-
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-# and contributors, for complete list see
-# http://projects.almad.net/sneakylang/wiki/Contributors
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
-###
+Parser transforming input stream to DOM
+"""
 
 import logging
 
 from err import ParserRollback, MacroCallError
 
-import macro
 from node import TextNode
 from register import Register
-from macro_caller import expand_macro_from_stream
 from treebuilder import TreeBuilder
 
 #FIXME

sneakylang/register.py

 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-import logging
 from re import compile, UNICODE
 
 from expanders import Expander
 from macro_caller import get_macro_name, expand_macro_from_stream
 
-__all__ = ['ExpanderRegister', 'ParserRegister', 'Register', 'RegisterMap']
+__all__ = ('ExpanderRegister', 'ParserRegister', 'Register', 'RegisterMap')
 
 class RegisterMap(dict):
     """ Register map is dictionary holding macro : register_with_allowed_macros pair """

sneakylang/test/module_test.py

 
 """ Module for commons shared by tests """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
 import re
 
-import os, sys
+import os
+import sys
 import logging
 logging = logging.getLogger('sneakylang')
 
 
 from sneakylang.err import ParserRollback, MacroCallError
 from sneakylang.macro import Macro
-from sneakylang.macro_caller import parse_macro_arguments
 from sneakylang.node import Node, TextNode
 from sneakylang.parser import *
-from sneakylang.register import Register
-from sneakylang.expanders import Expander, expand, TextNodeExpander
+from sneakylang.expanders import Expander, expand
 
 class DummyMacro(Macro):
     name = 'dummy_macro'

sneakylang/test/run.py

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
 import unittest
 import imp
-import os, sys
+import os
+import sys
 
 os.chdir(os.path.dirname(os.path.abspath(__file__)))
 

sneakylang/test/test_expanders.py

 
 """ Test Expanders """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
-import re
 
 from unittest import main,TestCase
 
 from sneakylang.err import *
 from sneakylang.macro_caller import *
 from sneakylang.register import Register, RegisterMap
-from sneakylang.treebuilder import TreeBuilder
 
 #logging.basicConfig(level=logging.DEBUG)
 

sneakylang/test/test_macro.py

 
 """ Test Macros and related things"""
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
-import re
 
 from unittest import main,TestCase
 

sneakylang/test/test_macro_caller.py

 import sys
 sys.path.insert(0, os.path.join(os.pardir, os.pardir))
 
-from unittest import main,TestCase
+from unittest import main, TestCase
 from module_test import *
 
 from sneakylang.macro_caller import *
 from sneakylang.treebuilder import TreeBuilder
+from sneakylang.register import Register
 
 #logging.basicConfig(level=logging.DEBUG)
 

sneakylang/test/test_macro_hooks.py

  #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
 """ Test macro hooks"""
 
 
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import re
 
-from unittest import main,TestCase
+from unittest import main, TestCase
 
 from module_test import *
 from sneakylang.register import Register, RegisterMap

sneakylang/test/test_macro_syntax.py

 
 """ Test macro syntax, now being build-in into main parser """
 
-from os import pardir, tmpfile, remove
-import logging
-import re
-
-from unittest import main,TestCase
+from unittest import TestCase
 from module_test import *
 
 #logging.basicConfig(level=logging.DEBUG)
 
-from sneakylang import parse, RegisterMap, Document
+from sneakylang import parse, RegisterMap, Document, Register
+from sneakylang.expanders import TextNodeExpander
 
 class TestArgumentParsing(TestCase):
     def testParsingShortArgument(self):

sneakylang/test/test_negation.py

 """ Test Negation
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
-import re
 
-from unittest import main,TestCase, TestSuite
+from unittest import main, TestCase
 
 from module_test import *
-from sneakylang import parse, RegisterMap, Document
+
+from sneakylang import parse, RegisterMap
 
 #logging.basicConfig(level=logging.DEBUG)
 

sneakylang/test/test_parser.py

 """ Test Parsers
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
-import re
 
 from unittest import main,TestCase
 
 from module_test import *
 
-from sneakylang.macro import Macro
-from sneakylang.node import Node
 from sneakylang.parser import *
 from sneakylang.register import Register, RegisterMap
 from sneakylang import *

sneakylang/test/test_register.py

 """ Test context-sensitive Parser registry.
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
 
 from unittest import main,TestCase
 
 from sneakylang.register import *
 
 from sneakylang.macro import Macro
-from sneakylang.node import Node
 from sneakylang.parser import Parser
 from sneakylang.treebuilder import TreeBuilder
 

sneakylang/test/test_regressions.py

 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2006 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
-import re
 
 from unittest import main,TestCase
 from module_test import *
 
 #logging.basicConfig(level=logging.DEBUG)
 
-from sneakylang.err import ParserRollback
-from sneakylang.macro import Macro
-from sneakylang.node import Node, TextNode
+from sneakylang.node import TextNode
 from sneakylang.parser import *
 from sneakylang.register import Register, RegisterMap
-from sneakylang.expanders import Expander, expand, TextNodeExpander
+from sneakylang.expanders import expand, TextNodeExpander
 
 
 register_map = RegisterMap({

sneakylang/test/test_state.py

 """ Test context-sensitive Parser registry.
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
 
 from unittest import main,TestCase
 
         tree = parse(s, RegisterMap({StrongVistingMacro : Register()}), state=state, document_root=True)
         self.assertEquals(state.visited, 1)
 
-
-
-
 if __name__ == "__main__":
     main()

sneakylang/test/test_treebuilder.py

 """ Test context-sensitive Parser registry.
 """
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-from os import pardir, tmpfile, remove
+from os import pardir
 from os.path import join
 import sys
 sys.path.insert(0, join(pardir, pardir))
-import logging
 
-from unittest import main,TestCase, TestSuite
+from unittest import main, TestCase
 
 #logging.basicConfig(level=logging.DEBUG)
 

sneakylang/treebuilder.py

 # -*- coding: utf-8 -*-
 
-###
-# SneakyLang: Extensible WikiFramework
-#Copyright (C) 2007 Lukas "Almad" Linhart http://www.almad.net/
-#
-#This library is free software; you can redistribute it and/or
-#modify it under the terms of the GNU Lesser General Public
-#License as published by the Free Software Foundation; either
-#version 2.1 of the License, or (at your option) any later version.
-#
-#This library is distributed in the hope that it will be useful,
-#but WITHOUT ANY WARRANTY; without even the implied warranty of
-#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#Lesser General Public License for more details.
-#
-#You should have received a copy of the GNU Lesser General Public
-#License along with this library; if not, write to the Free Software
-#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-###
-
-__all__ = ['TreeBuilder', 'root_required']
+__all__ = ('TreeBuilder', 'root_required')
 
 def root_required(fn):
     """ Decorator for administrator authorization