Пример #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)
Пример #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
Пример #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
Пример #4
0
def download_album(links,folder):
    for link in links:
        filename='%s\\%s'%(folder,link.split('/')[-1])
        queue.put((link,filename))
Пример #5
0
def download_album(links, folder):
    for link in links:
        filename = "%s\\%s" % (folder, link.split("/")[-1])
        queue.put((link, filename))
Пример #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))
Пример #7
0
def download_album(links, folder):
    for link in links:
        filename = '%s\\%s' % (folder, link.split('/')[-1])
        queue.put((link, filename))
Пример #8
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))