show /

# Test stuff for interactive use

# Not a real part of the module.  More a snippet
# for exploring the behavior of things under
# interactive use

from say import show

def f(x):
    return 4

isInteractive = hasattr(sys, 'ps1') or hasattr(sys, 'ipcompleter')
# other methods of determining interactivity mentioned at:

def call():
    print "__name__", __name__
    print "__package__", __package__
    caller = inspect.currentframe().f_back
    print caller
    print dir(caller)
    print "lineno:", caller.f_lineno
    print "f_code", caller.f_code
    print "f_code.co_filename", caller.f_code.co_filename
    if caller.f_code.co_filename == '<stdin>':
        print history.line(-1)