Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #takes a directory as a command line argument. it lists the dir
- import sys
- import re
- import os
- def List(dir):
- filenames = os.listdir(dir)
- for filename in filenames:
- path = os.path.join(dir, filename)
- print os.path.abspath(path)
- #main() to dump file to screen
- def main():
- List(sys.argv[1])
- #boilerplate main() call.
- if __name__=='__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment