403Webshell
Server IP : 182.53.201.61  /  Your IP : 216.73.217.175
Web Server : Apache/2.2.15 (Fedora)
System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686
User : apache ( 48)
PHP Version : 5.3.3
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python2.6/site-packages/gnome_sudoku/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python2.6/site-packages/gnome_sudoku/simple_debug.py
# -*- coding: utf-8 -*-
import optparse
import defaults

parser = optparse.OptionParser(
    version=defaults.VERSION,
    option_list=[
    optparse.make_option("-v", const=True, action="store_const",
                         dest="debug", help="Print debug information",
                         default=False),
    optparse.make_option("-p", const=True, action="store_const",
                         dest="profile", help="Profile gnome-sudoku",
                         default=False),
    optparse.make_option("-w", const=True, action="store_const",
                         dest="walk", help="Step through program",
                         default=False),
    ]
    )

options, args = parser.parse_args()


# Make a lovely wrapper
if options.debug:
    def simple_debug (f):
        def _ (self, *args, **kwargs):
            print self.__class__, f.__name__, args, kwargs
            return f(self, *args, **kwargs)
        return _

elif options.walk:
    ff = []
    def simple_debug (f):
        def _ (self, *args, **kwargs):
            if (self.__class__, f.__name__) not in ff:
                print self.__class__, f.__name__, args, kwargs
                if raw_input('Hit return to step forward (hit i to ignore this function): ')=='i':
                    ff.append((self.__class__, f.__name__))
            return f(self, *args, **kwargs)
        return _


else:
    def simple_debug (f):
        return f

Youez - 2016 - github.com/yon3zu
LinuXploit