Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Need help

Name: Anonymous 2009-05-06 6:54

Given: large file with list of files and folder which contain a great number of files.
Need: remove from list files which exist in a folder.
Tools: Bourne Shell or Windows command line or Python.

Name: Gigantic Faggot 2009-05-06 15:38

Just because I don't feel like teaching you anything I will draw this out as far as I have too.

#Python ISO bullshit here
import os
from mutex import mutex
from threading import Thread

q = "/path/to/file/with/lists/of/paths.txt"
nl = ""
nlm = mutex.mutex()
d = []

def a(z):
  global nl
  nl += z

def f(g):
  global nlm
  if not os.path.exists(g):
     nlm.lock(z, g)
     nlm.unlock()

if __name__ == "__main__":
   h = open(q, 'r')
   for l in h.xreadlines():
      p = Thread(None, f, None, (l))
      d.append(p)
      p.start()
   for t in d:
      t.join()
   print "Done!"
   print nl
   f = open('nl.txt', 'w')
   f.write(nl)
   f.close()

#end of python script

Enjoy your script

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List