#NEWLINE# def set_window_value( key , value = None ) : #NEWLINE# #INDENT# '\n    Set value in window session settings.\n\n    NOTE: Window object in Sublime Text 2 has no Settings.\n    ' #NEWLINE# try : #NEWLINE# #INDENT# settings = sublime . active_window ( ) . settings ( ) #NEWLINE# if settings . has ( S . KEY_XDEBUG ) : #NEWLINE# #INDENT# xdebug = settings . get ( S . KEY_XDEBUG ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# xdebug = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# if ( value is not None ) : #NEWLINE# #INDENT# xdebug [ key ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( key in xdebug . keys ( ) ) : #NEWLINE# #INDENT# del xdebug [ key ] #NEWLINE# #UNINDENT# #UNINDENT# settings . set ( S . KEY_XDEBUG , value ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass