Archive

Archive for January, 2009

a better .pythonrc?

January 24th, 2009 Bob No comments

Over on this blog, I pointed out a bug in some code. Stupid blogger won’t let me format a better version, so I’ll post it here:

try:
    import readline
except ImportError:
    pass
else:
    import rlcompleter
    import os.path
    import atexit

    class irlcompleter(rlcompleter.Completer):
        def complete(self, text, state):
            if text == "":
                readline.insert_text('\t')
                return None
            else:
                return rlcompleter.Completer.complete(self,text,state)

    readline.parse_and_bind("tab: complete")
    readline.set_completer(irlcompleter().complete)

    # Restore our command-line history, and save it when Python exits.
    history_file = os.path.expanduser("~/.pyhistory")
    if os.path.exists(history_file):
        readline.read_history_file(history_file)
        def save_hist():
            import readline
            readline.write_history_file(history_file)
        atexit.register(save_hist)

    # Clean up the namespace.
    del readline
    del os.path
    del atexit
Categories: programming Tags:

boycott israel?

January 19th, 2009 Bob No comments

Yes. Don’t take my word for it; listen as Naomi Klein explains why.

Categories: power Tags:

jews run america?

January 19th, 2009 Bob No comments

Sometimes, apparently. Is it bragging when the Jerusalem Post reports how Olmert bullies Bush and Rice into voting against a UN resolution she helped write?

Categories: power Tags:

want to read about israel?

January 19th, 2009 Bob No comments

http://www.ifamericansknew.org looks interesting.

Categories: power Tags: