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