Exemplo n.º 1
0
def SyncFolder(args):
    print("SyncFolder")
    print(socket.gethostbyname(args.card_uri.hostname))
    
    port=args.card_uri.port    
    if(port == None):
        port = 80
    
    a=card.connection(socket.gethostbyname(args.card_uri.hostname), port, args.timeout)
    print("Use ctrl-c to exit!")
    while True:
        a.sync_new_pictures_since_start(args.folder_remote, args.folder_local)
        time.sleep(1)
        pass
Exemplo n.º 2
0
def SyncFolder(args):
    print("SyncFolder")
    print(socket.gethostbyname(args.card_uri.hostname))
    
    port=args.card_uri.port    
    if(port == None):
        port = 80
    
    a=card.connection(socket.gethostbyname(args.card_uri.hostname), port, args.timeout)
    print("Use ctrl-c to exit!")
    while True:
        a.sync_folder_to_remote_folder(args.folder_remote, args.folder_local, extensions=args.ext)
        time.sleep(1)
        pass
Exemplo n.º 3
0
 def image_get(self):
     self.runLock.acquire(True)
     con=card.connection(self.ipAddr, self.port, self.timeout)
     while self.run:           
         self.runLock.release()
         fileName=con.sync_new_pictures_since_start(self.folder_remote, self.folder_local)
         if(len(fileName)>0):
             print(fileName)
             image=QtGui.QImage(fileName)
             self.emit(QtCore.SIGNAL('load_image(QImage)'), image)
             time.sleep(1)
             pass
         self.runLock.acquire(True)
     self.runLock.release()
     print("Exiting thread...")
Exemplo n.º 4
0
def SyncFolder(args):
    print("SyncFolder")
    print(socket.gethostbyname(args.card_uri.hostname))

    port = args.card_uri.port
    if (port == None):
        port = 80

    a = card.connection(socket.gethostbyname(args.card_uri.hostname), port,
                        args.timeout)
    print("Use ctrl-c to exit!")
    while True:
        a.sync_new_pictures_since_start(args.folder_remote, args.folder_local)
        time.sleep(1)
        pass
Exemplo n.º 5
0
 def image_get(self):
     self.runLock.acquire(True)
     con = card.connection(self.ipAddr, self.port, self.timeout)
     while self.run:
         self.runLock.release()
         fileName = con.sync_new_pictures_since_start(
             self.folder_remote, self.folder_local)
         if (len(fileName) > 0):
             print(fileName)
             image = QtGui.QImage(fileName)
             self.emit(QtCore.SIGNAL('load_image(QImage)'), image)
             time.sleep(1)
             pass
         self.runLock.acquire(True)
     self.runLock.release()
     print("Exiting thread...")
Exemplo n.º 6
0
def SyncFolder(args):
    print("SyncFolder")
    print(socket.gethostbyname(args.card_uri.hostname))

    port = args.card_uri.port
    if (port == None):
        port = 80

    a = card.connection(socket.gethostbyname(args.card_uri.hostname), port,
                        args.timeout)
    print("Use ctrl-c to exit!")
    while True:
        a.sync_folder_to_remote_folder(args.folder_remote,
                                       args.folder_local,
                                       extensions=args.ext)
        time.sleep(1)
        pass