wshell本來是使用dropzone來處理文件上傳,它只支持IE10+瀏覽器。所以在ie9下沒法使用,同時它還會有一個提示,並顯示一個缺省的文件上傳描述及上傳按鈕。的確不方便。今天把它去掉了,改成了jquery file upload插件。所以你能夠這樣操做:html
wshell還新増了一個show命令能夠用來顯示當前目錄下的圖片。它能夠帶參數或不帶,帶參數可使用通配符,不帶時就是全部圖片。html5
還修正了使用subprocess.Popen時返回信息不完整的一個bug。原來的邏輯大致上是:jquery
while self.process.poll() is None: line = self.process.stdout.readline() if line: self.process.timestamp = now() self.output('data', self.server.safe_encode(line.rstrip()))
可是發現,有時輸出少東西。後面發現,由於使用了gevent.subprocess,因此stdout.readline()是不會阻塞的,若是沒數據會返回 ''。所以上面的處理就會形成,讀出一行後,再循環時,程序可能已經結束了,後面的數據就讀不出來了。後來改成:git
while self.process.poll() is None: while 1: line = self.process.stdout.readline() if line: self.process.timestamp = now() self.output('data', self.server.safe_encode(line.rstrip())) else: break
即循環讀取readline(),這樣保證先把能讀的數據所有讀出來。這樣就沒有問題了。github