Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
find_file.py
#1
PHP Code:
#!/usr/bin/env python import sys import os def find_file(tree, pattern, func): try: listdir=os.list(tree) except: func(tree, '(error)') return # for i in listdir: path=os.path.join(tree, i) # if os.path.isdir(path) find_file(path, pattern, func) #recursion # if pattern in i: func(path) def file_found_simple(file_name, message=''): print '%s%s' %(message, file name) if _name_=='_main_': try: tree=sys.argv[1] pattern=sys.argv[2] except: print '%s<tree><pattern>' %(sys.argv[0]) sys.exit(1) # try: test=os.listdir(tree) except Exception, e: print e sys.exit(2) # find_file(tree, pattern, file_found_simple)

bwt linux kk. Bigsmile
Reply
#2
wah...!!

sayang..!!

aku cman pake WN,,,

xixixix
PHP Code:
root@xh4x0r / $ ~
Reply
#3
(02-21-2010, 05:06 PM)Up_Crew Wrote: wah...!!

sayang..!!

aku cman pake WN,,,

xixixix

sama kk,sy cm nebeng d'compy tmn... Ngakak Ngakak
Reply
#4
wew.

for linux yah..
kalu untuk wn ada gakk
:">
just ordinary man.
Reply
#5
@atas
krang tw sy kk...
sundul...
Reply
#6
windows pakek python bisa ?
Reply
#7
hhihihi...!!

gk jalan Python sama Pc ku..!!

dak tau knpa..!!

Aseeemm
PHP Code:
root@xh4x0r / $ ~
Reply
#8
itu program find di linux kan?
tapi di buat di python

sama z kayak perint.ah

#find / -name "HN.*"

xixiix
menurut ane gtu om
Reply
#9
(02-26-2010, 03:32 PM)N4ck0 Wrote: itu program find di linux kan?
tapi di buat di python

sama z kayak perint.ah

#find / -name "HN.*"

xixiix
menurut ane gtu om

ya kk n4ck0 bwt find di linux dijadiin python kk..Malu
versi laen : #find / -name "HN.*" Ngakak
Reply
#10
thanks brader jurank_dangkkal
tak oprek dulu di linux ku
ok
Dunia Mimpi, Semua Nyata
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)