Esempio n. 1
0
 def print_exptree(self):
     queue = Queue()
     # print(self.start,self.end)
     queue.put(self)
     while (not queue.empty()):
         t_f = queue.get()
         print(t_f.start, t_f.end)
         for f in t_f.fields:
             t_f.put(f)
Esempio n. 2
0
	def newProcExecuteCmd(self, queue, cmd):
		if cmd == "" or cmd == None:
			return False
		result = (commands.getstatusoutput(cmd))
		print result
		# print result
		if result[0] != 0:
			queue.put(-1)
			return
		queue.put(result[1])
		return
Esempio n. 3
0
    def newProcExecuteCmd(self, queue, cmd):
        import os

        if cmd == "" or cmd is None:
            return False
        print cmd
        #result = (commands.getstatusoutput(cmd))
        result = [0, os.popen(cmd).read()]
        # print result

        #print result[1]
        if result[0] != 0:
            queue.put(-1)
            return
        queue.put(result[1])

        return
def download_album(links,folder):
    for link in links:
        filename='%s\\%s'%(folder,link.split('/')[-1])
        queue.put((link,filename))
def download_album(links, folder):
    for link in links:
        filename = "%s\\%s" % (folder, link.split("/")[-1])
        queue.put((link, filename))
Esempio n. 6
0
def download_album(photos, folder):
    for pic in photos:
        url = re.findall('large:\'(.*?)\'', pic)[0]
        filename = "".join((folder, '\\', url.split('/')[-1]))
        queue.put((url, filename))
def download_album(links, folder):
    for link in links:
        filename = '%s\\%s' % (folder, link.split('/')[-1])
        queue.put((link, filename))
def download_album(photos,folder):
    for pic in photos:
        url=re.findall('large:\'(.*?)\'',pic)[0]
        filename="".join((folder,'\\',url.split('/')[-1]))
        queue.put((url,filename))