Exemplo n.º 1
0
 def __init__(self, conn, args):
     MessageServer.MessageServerHandler.__init__(self, conn, args)
     self.clientConn.sendMessage("SUCCESS")
     args = args.split("\n")
     startingDir = args.pop(0)
     decodedStartingDir = System.decode_from_filesystem(startingDir)
     Startup.handle_args(decodedStartingDir, args)
Exemplo n.º 2
0
 def __init__(self, conn, args):
   MessageServer.MessageServerHandler.__init__(self, conn, args)
   self.clientConn.sendMessage("SUCCESS")
   args = args.split("\n")
   startingDir = args.pop(0)
   decodedStartingDir = System.decode_from_filesystem(startingDir)
   Startup.handle_args(decodedStartingDir, args)
   
Exemplo n.º 3
0
def _input_to_unicode(input):
    """Take some input and make sure it is unicode.  
  If it's a string, decode it using the filesystem encoding.
  If it's unicode, just return it directly"""
    if type(input) == types.StringType:
        return System.decode_from_filesystem(input)
    elif type(input) == types.UnicodeType:
        return input
    else:
        raise AssertionError("Input must be a basestring")
Exemplo n.º 4
0
 def on_response(dialog, response_id):
   if response_id == gtk.RESPONSE_OK:
     filename = System.decode_from_filesystem(dialog.get_filename())
     callback(filename)
   dialog.destroy()