source: CSML/trunk/Coapec/directorytest.py @ 45

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/CSML/trunk/Coapec/directorytest.py@45
Revision 45, 1.4 KB checked in by domlowe, 15 years ago (diff)

removed old csmlscan.py
renamed newcsmlscan.py to csmlscan.py

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/usr/bin/env python
2
3import csmllibs
4
5
6#test code - how to read directory tree
7
8dt = csmllibs.csmldirectory.DirectoryTree()
9dt.setTopDirectory('/home/users/domlowe/CSML/Coapec/testfiles')
10dt.readDirectory()
11subs=dt.getSubDirectories()
12i=0 #or something
13files= dt.getFilesInSubDir(subs[i])
14csmlfilesinsub=dt.getCSMLSupportedFilesInSubDir(subs[i])
15allcsmlfiles=dt.getAllCSMLSupportedFiles()
16firstfile=dt.getFirstInSubDir(subs[i])
17
18
19
20print "**********************START*******************************"
21print "SubDirectories:"
22print "**********************************************************"
23print subs
24print "**********************************************************"
25print "Files in SubDirectory "+subs[i]+":"
26print "**********************************************************"
27print files                             
28print "**********************************************************"
29print "CSML Supported Files in SubDirectory "+subs[i]+":"
30print "**********************************************************"
31print csmlfilesinsub
32print "**********************************************************"
33print "ALL CSML Supported Files:"
34print "**********************************************************"
35print allcsmlfiles                             
36print "**********************************************************"
37print "First File:"
38print "**********************************************************"
39print firstfile                         
40print "***********************END********************************"
41
Note: See TracBrowser for help on using the repository browser.