ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/ns_dev/NinoCode/RandomCodeRequests/JimProj2.txt
Revision: 3
Committed: Sat May 5 03:52:28 2012 UTC (13 years, 10 months ago) by ninoborges
Content type: text/plain
File size: 25834 byte(s)
Log Message:
Initial Import

File Contents

# User Rev Content
1 ninoborges 3 PythonWin 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on win32.
2     Portions Copyright 1994-2004 Mark Hammond (mhammond@skippinet.com.au) - see 'Help/About PythonWin' for further copyright information.
3     >>> prodList = []
4     >>> import wrLineCall
5     Traceback (most recent call last):
6     File "<interactive input>", line 1, in ?
7     IndentationError: expected an indented block (wrLineCall.py, line 7)
8     >>> import wrLineCall
9     Traceback (most recent call last):
10     File "<interactive input>", line 1, in ?
11     IndentationError: expected an indented block (wrLineCall.py, line 7)
12     >>> import wrLineCl
13     Traceback (most recent call last):
14     File "<interactive input>", line 1, in ?
15     IndentationError: expected an indented block (wrLineCl.py, line 7)
16     >>> import wrLineCl
17     >>> import os
18     >>> os.path.walk(r"\\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"")
19     >>> os.path.walk(r"\\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath(),"")
20     Traceback (most recent call last):
21     File "<interactive input>", line 1, in ?
22     TypeError: wrPath() takes exactly 3 arguments (0 given)
23     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"test")
24     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"test")
25     \\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water
26     ['San Jose Water Conservation', 'TT0009613 - Additional SOW - April & May 2006.doc', 'TT0009614 - Additional SOW - April & May 2006.pdf', 'TT0009615 - Additional SOW - April 2005.doc', 'TT0009616 - Additional SOW - April 2005.pdf', 'TT0009617 - Additional SOW - April part 2 2005.doc', 'TT0009618 - Additional SOW - April part 2 2005.pdf', 'TT0009619 - Additional SOW - April part 3 2005.doc', 'TT0009620 - Additional SOW - April part 3 2005.pdf', 'TT0009621 - Additional SOW - Aug 2004.doc', 'TT0009622 - Additional SOW - Aug 2006.doc', 'TT0009623 - Additional SOW - August 2004.pdf', 'TT0009624 - Additional SOW - August 2005.doc', 'TT0009625 - Additional SOW - August 2005.pdf', 'TT0009626 - Additional SOW - Feb part 2 2005.doc', 'TT0009627 - Additional SOW - Feb part 2 2005.pdf', 'TT0009628 - Additional SOW - Feb part 3 2005.doc', 'TT0009629 - Additional SOW - Feb part 3 2005.pdf', 'TT0009630 - Additional SOW - February 2006.doc', 'TT0009631 - Additional SOW - February 2006.pdf', 'TT0009632 - Additional SOW - Jan 2005.doc', 'TT0009633 - Additional SOW - Jan 2005.pdf', 'TT0009634 - Additional SOW - Jan- Part 2- 2005.doc', 'TT0009635 - Additional SOW - Jan- Part 2- 2005.pdf', 'TT0009636 - Additional SOW - January 2006.pdf', 'TT0009637 - Additional SOW - July part 1 2005.doc', 'TT0009638 - Additional SOW - July part 1 2005.pdf', 'TT0009639 - Additional SOW - June & July 2006.doc', 'TT0009640 - Additional SOW - June & July 2006.pdf', 'TT0009641 - Additional SOW - June 2004.doc', 'TT0009642 - Additional SOW - June 2004.pdf', 'TT0009643 - Additional SOW - March 2006.doc', 'TT0009644 - Additional SOW - March 2006.pdf', 'TT0009645 - Additional SOW - May part 1 2005.doc', 'TT0009646 - Additional SOW - May part 1 2005.pdf', 'TT0009647 - Additional SOW - May part 2 2005.doc', 'TT0009648 - Additional SOW - May part 2 2005.pdf', 'TT0009649 - Additional SOW - Nov 2004.doc', 'TT0009650 - Additional SOW - Nov 2004.pdf', 'TT0009651 - Additional SOW - November 2005.doc', 'TT0009652 - Additional SOW - November 2005.pdf', 'TT0009653 - Additional SOW - Oct 2004.doc', 'TT0009654 - Additional SOW - Oct 2004.pdf', 'TT0009655 - Additional SOW - October 2005 part 2.doc', 'TT0009656 - Additional SOW - October 2005 part 2.pdf', 'TT0009657 - Additional SOW - October 2005.doc', 'TT0009658 - Additional SOW - October 2005.pdf', 'TT0009659 - Additional SOW - Sept 2004.doc', 'TT0009660 - Additional SOW - Sept 2004.pdf', 'TT0009661 - Additional SOW - Sept 2006.doc', 'TT0009662 - Additional SOW - Sept 2006.pdf', 'TT0009663 - Additional SOW -Feb 2005.doc', 'TT0009664 - Additional SOW -Feb 2005.pdf', 'TT0009665 - August SOW(14).msg', 'TT0009666 - August SOW(15).msg', 'TT0009667 - Contract and SOW 5-20-04.pdf', 'TT0009668 - Contract and SOW.doc', 'TT0009669 - RE Invoice Update(16).msg', 'TT0009670 - RE Invoice Update(17).msg', 'TT0009671 - SJW Additional SOWCosting(14).msg', 'TT0009672 - SJW Additional SOWCosting(15).msg', 'TT0009673 - Supplemental Explanation of Services at Foxhall.doc', 'TT0009674 - Supplemental Explanation of Services at Foxhall.pdf']
27     \\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water\San Jose Water Conservation
28     ['TT0009675 - Additional SOW - Aug 2004.doc', 'TT0009676 - Additional SOW - August 2004.pdf', 'TT0009677 - Additional SOW - Jan 2005.doc', 'TT0009678 - Additional SOW - Jan 2005.pdf', 'TT0009679 - Additional SOW - Jan- Part 2- 2005.doc', 'TT0009680 - Additional SOW - Jan- Part 2- 2005.pdf', 'TT0009681 - Additional SOW - June 2004.doc', 'TT0009682 - Additional SOW - June 2004.pdf', 'TT0009683 - Additional SOW - Nov 2004.doc', 'TT0009684 - Additional SOW - Nov 2004.pdf', 'TT0009685 - Additional SOW - Oct 2004.doc', 'TT0009686 - Additional SOW - Oct 2004.pdf', 'TT0009687 - Additional SOW - Sept 2004.doc', 'TT0009688 - Additional SOW - Sept 2004.pdf', 'TT0009689 - Contract and SOW 5-20-04.pdf', 'TT0009690 - Contract and SOW.doc', 'TT0009691 - Thumbs.db']
29     >>> reload(wrLineCl)
30     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.pyc'>
31     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"test")
32     \\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water
33     ['San Jose Water Conservation', 'TT0009613 - Additional SOW - April & May 2006.doc', 'TT0009614 - Additional SOW - April & May 2006.pdf', 'TT0009615 - Additional SOW - April 2005.doc', 'TT0009616 - Additional SOW - April 2005.pdf', 'TT0009617 - Additional SOW - April part 2 2005.doc', 'TT0009618 - Additional SOW - April part 2 2005.pdf', 'TT0009619 - Additional SOW - April part 3 2005.doc', 'TT0009620 - Additional SOW - April part 3 2005.pdf', 'TT0009621 - Additional SOW - Aug 2004.doc', 'TT0009622 - Additional SOW - Aug 2006.doc', 'TT0009623 - Additional SOW - August 2004.pdf', 'TT0009624 - Additional SOW - August 2005.doc', 'TT0009625 - Additional SOW - August 2005.pdf', 'TT0009626 - Additional SOW - Feb part 2 2005.doc', 'TT0009627 - Additional SOW - Feb part 2 2005.pdf', 'TT0009628 - Additional SOW - Feb part 3 2005.doc', 'TT0009629 - Additional SOW - Feb part 3 2005.pdf', 'TT0009630 - Additional SOW - February 2006.doc', 'TT0009631 - Additional SOW - February 2006.pdf', 'TT0009632 - Additional SOW - Jan 2005.doc', 'TT0009633 - Additional SOW - Jan 2005.pdf', 'TT0009634 - Additional SOW - Jan- Part 2- 2005.doc', 'TT0009635 - Additional SOW - Jan- Part 2- 2005.pdf', 'TT0009636 - Additional SOW - January 2006.pdf', 'TT0009637 - Additional SOW - July part 1 2005.doc', 'TT0009638 - Additional SOW - July part 1 2005.pdf', 'TT0009639 - Additional SOW - June & July 2006.doc', 'TT0009640 - Additional SOW - June & July 2006.pdf', 'TT0009641 - Additional SOW - June 2004.doc', 'TT0009642 - Additional SOW - June 2004.pdf', 'TT0009643 - Additional SOW - March 2006.doc', 'TT0009644 - Additional SOW - March 2006.pdf', 'TT0009645 - Additional SOW - May part 1 2005.doc', 'TT0009646 - Additional SOW - May part 1 2005.pdf', 'TT0009647 - Additional SOW - May part 2 2005.doc', 'TT0009648 - Additional SOW - May part 2 2005.pdf', 'TT0009649 - Additional SOW - Nov 2004.doc', 'TT0009650 - Additional SOW - Nov 2004.pdf', 'TT0009651 - Additional SOW - November 2005.doc', 'TT0009652 - Additional SOW - November 2005.pdf', 'TT0009653 - Additional SOW - Oct 2004.doc', 'TT0009654 - Additional SOW - Oct 2004.pdf', 'TT0009655 - Additional SOW - October 2005 part 2.doc', 'TT0009656 - Additional SOW - October 2005 part 2.pdf', 'TT0009657 - Additional SOW - October 2005.doc', 'TT0009658 - Additional SOW - October 2005.pdf', 'TT0009659 - Additional SOW - Sept 2004.doc', 'TT0009660 - Additional SOW - Sept 2004.pdf', 'TT0009661 - Additional SOW - Sept 2006.doc', 'TT0009662 - Additional SOW - Sept 2006.pdf', 'TT0009663 - Additional SOW -Feb 2005.doc', 'TT0009664 - Additional SOW -Feb 2005.pdf', 'TT0009665 - August SOW(14).msg', 'TT0009666 - August SOW(15).msg', 'TT0009667 - Contract and SOW 5-20-04.pdf', 'TT0009668 - Contract and SOW.doc', 'TT0009669 - RE Invoice Update(16).msg', 'TT0009670 - RE Invoice Update(17).msg', 'TT0009671 - SJW Additional SOWCosting(14).msg', 'TT0009672 - SJW Additional SOWCosting(15).msg', 'TT0009673 - Supplemental Explanation of Services at Foxhall.doc', 'TT0009674 - Supplemental Explanation of Services at Foxhall.pdf']
34     \\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water\San Jose Water Conservation
35     ['TT0009675 - Additional SOW - Aug 2004.doc', 'TT0009676 - Additional SOW - August 2004.pdf', 'TT0009677 - Additional SOW - Jan 2005.doc', 'TT0009678 - Additional SOW - Jan 2005.pdf', 'TT0009679 - Additional SOW - Jan- Part 2- 2005.doc', 'TT0009680 - Additional SOW - Jan- Part 2- 2005.pdf', 'TT0009681 - Additional SOW - June 2004.doc', 'TT0009682 - Additional SOW - June 2004.pdf', 'TT0009683 - Additional SOW - Nov 2004.doc', 'TT0009684 - Additional SOW - Nov 2004.pdf', 'TT0009685 - Additional SOW - Oct 2004.doc', 'TT0009686 - Additional SOW - Oct 2004.pdf', 'TT0009687 - Additional SOW - Sept 2004.doc', 'TT0009688 - Additional SOW - Sept 2004.pdf', 'TT0009689 - Contract and SOW 5-20-04.pdf', 'TT0009690 - Contract and SOW.doc', 'TT0009691 - Thumbs.db']
36     >>> reload(wrLineCl)
37     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
38     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"test")
39     Traceback (most recent call last):
40     File "<interactive input>", line 1, in ?
41     File "C:\Python24\lib\ntpath.py", line 329, in walk
42     func(arg, top, names)
43     File "G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py", line 8, in wrPath
44     outputFile.write(filesInDir+"\n")
45     TypeError: can only concatenate list (not "str") to list
46     >>> reload(wrLineCl)
47     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
48     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
49     Traceback (most recent call last):
50     File "<interactive input>", line 1, in ?
51     File "C:\Python24\lib\ntpath.py", line 329, in walk
52     func(arg, top, names)
53     File "G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py", line 8, in wrPath
54     outputFile.write(filesInDir)
55     TypeError: argument 1 must be string or read-only character buffer, not list
56     >>> reload(wrLineCl)
57     Traceback (most recent call last):
58     File "<interactive input>", line 1, in ?
59     File "G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py", line 17
60    
61     ^
62     SyntaxError: invalid syntax
63     >>> reload(wrLineCl)
64     Traceback (most recent call last):
65     File "<interactive input>", line 1, in ?
66     File "G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py", line 14
67     outputFile.close()
68     ^
69     SyntaxError: invalid syntax
70     >>> reload(wrLineCl)
71     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
72     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
73     >>> reload(wrLineCl)
74     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
75     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
76     Traceback (most recent call last):
77     File "<interactive input>", line 1, in ?
78     File "C:\Python24\lib\ntpath.py", line 329, in walk
79     func(arg, top, names)
80     File "G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py", line 8, in wrPath
81     if os.path.isfile(dirName + "\\" + file):
82     NameError: global name 'os' is not defined
83     >>> reload(wrLineCl)
84     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
85     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
86     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
87     >>> outputFile.close()
88     >>> reload(wrLineCl)
89     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
90     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
91     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
92     >>> outputFile.close()
93     >>> reload(wrLineCl)
94     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
95     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
96     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
97     >>> outputFile.close()
98     >>> reload(wrLineCl)
99     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
100     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water",wrLineCl.wrPath,"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
101     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
102     >>> outputFile.close()
103     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
104     >>> outputFile.write(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 1-07-08 Native Files [TT0014201-TT0016244]"+"\n")
105     >>> outputFile.close()
106     >>> os.path.walk(r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 1-07-08 Native Files [TT0014201-TT0016244],wrLineCl.wrPath","\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]\San Jose Water")
107     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 1-07-08 Native Files [TT0014201-TT0016244]"
108     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
109     >>> outputFile.close()
110     >>> outputFile = open(r"c:\test_dir\wrTest2.txt",'w')
111     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 10-17-07 Native Files [TT0001244 - TT0001245]"
112     >>> outputFile.write(startDir + "\n")
113     >>> outputFile.close()
114     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
115     >>> outputFile.close()
116     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]"
117     >>> outputFile = open(r"c:\test_dir\wrTest3.txt",'w')
118     >>> outputFile.write(startDir + "\n")
119     >>> outputFile.close()
120     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
121     >>> outputFile.close()
122     >>> outputFile = open(r"c:\test_dir\wrTest.txt",'w')
123     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 1-07-08 Native Files [TT0014201-TT0016244]"
124     >>> outputFile.write(startDir + "\n")
125     >>> outputFile.close()
126     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
127     >>> outputFile.close()
128     >>> outputFile = open(r"c:\test_dir\wrTest2.txt",'w')
129     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 10-17-07 Native Files [TT0001244 - TT0001245]"
130     >>> outputFile.write(startDir + "\n")
131     >>> outputFile.close()
132     >>> re
133     >>> reload(wrLineCl)
134     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
135     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
136     >>> outputFile.close()
137     >>> outputFile = open(r"c:\test_dir\wrTest3.txt",'w')
138     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 11-2-07 Native Files [TT0009613 - TT0010259]"
139     >>> outputFile.write(startDir + "\n")
140     >>> outputFile.close()
141     >>> reload(wrLineCl)
142     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
143     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
144     >>> outputFile.close()
145     >>> outputFile = open(r"c:\test_dir\wrTest4.txt",'w')
146     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Documents Produced by Tetra Tech on 12-04-07 Native Files [TT0010260 - TT0010502]"
147     >>> outputFile.write(startDir + "\n")
148     >>> outputFile.close()
149     >>> reload(wrLineCl)
150     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
151     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
152     >>> outputFile.close()
153     >>> outputFile = open(r"c:\test_dir\orrTest.txt",'w')
154     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Client Files received 11092007"
155     >>> outputFile.write(startDir + "\n")
156     >>> outputFile.close()
157     >>> reload(wrLineCl)
158     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
159     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
160     >>> outputFile.close()
161     >>> outputFile = open(r"c:\test_dir\orrTest2.txt",'w')
162     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Client Files received 12112007"
163     >>> outputFile.write(startDir + "\n")
164     >>> outputFile.close()
165     >>> reload(wrLineCl)
166     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
167     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
168     >>> outputFile = open(r"c:\test_dir\orrTest3.txt",'w')
169     >>> startDir = r"\\lasads01\data\cli\Tetra Tech\Native Client Files"
170     >>> outputFile.write(startDir + "\n")
171     >>> outputFile.close()
172     >>> reload(wrLineCl)
173     <module 'wrLineCl' from 'G:\Dev\Python\Ninocode\Tool_Box\wrLineCl.py'>
174     >>> os.path.walk(startDir,wrLineCl.wrPath,startDir)
175     >>> clientFiles = []
176     >>> file = ""
177     >>> for file in open(r"C:\Test_dir\orrTest.txt").readlines():
178     ... clientFile.append(file)
179     ...
180     Traceback (most recent call last):
181     File "<interactive input>", line 2, in ?
182     NameError: name 'clientFile' is not defined
183     >>> for file in open(r"C:\Test_dir\orrTest.txt").readlines():
184     ... clientFiles.append(file)
185     ...
186     >>> len(clientFiles)
187     4018
188     >>> for file in open(r"C:\Test_dir\orrTest2.txt").readlines():
189     ... clientFiles.append(file)
190     ...
191     >>> len(clientFiles)
192     36347
193     >>> for file in open(r"C:\Test_dir\orrTest3.txt").readlines():
194     ... clientFiles.append(file)
195     ...
196     >>> len(clientFiles)
197     66662
198     >>> import NinoGenTools
199     >>> prodCount = NinoGenTools.Counter()
200     >>> noProdCount = NinoGenTools.Counter()
201     >>> nativeProdFiles = []
202     >>> for file in open(r"C:\Test_dir\wrTest.txt").readlines():
203     ... nativeProdFiles.append(file)
204     ...
205     >>> for file in open(r"C:\Test_dir\wrTest2.txt").readlines():
206     ... nativeProdFiles.append(file)
207     ...
208     >>> for file in open(r"C:\Test_dir\wrTest3.txt").readlines():
209     ... nativeProdFiles.append(file)
210     ...
211     >>> for file in open(r"C:\Test_dir\wrTest4.txt").readlines():
212     ... nativeProdFiles.append(file)
213     ...
214     >>> len(nativeProdFiles)
215     2940
216     >>> x = ""
217     >>> for x in clientFiles:
218     ... if x in nativeProdFiles:
219     ... prodCount.inc()
220     ... else:
221     ... noProdCount.inc()
222     ...
223     >>> prodCount.count
224     3822
225     >>> noProdCount.count
226     62842
227     >>> prodCount.count
228     3822
229     >>> clientFiles = []
230     >>> file = ""
231     >>> for file in open(r"C:\Test_dir\orrTest.txt").readlines():
232     ... clientFiles.append(file)
233     ...
234     >>> len(clientFiles)
235     4018
236     >>> for file in open(r"C:\Test_dir\orrTest2.txt").readlines():
237     ... clientFiles.append(file)
238     ...
239     >>> len(clientFiles)
240     36347
241     >>> for file in open(r"C:\Test_dir\orrTest3.txt").readlines():
242     ... clientFiles.append(file)
243     ...
244     >>> len(clientFiles)
245     66662
246     >>> prodCount = NinoGenTools.Counter()
247     >>> prodCount
248     <NinoGenTools.Counter instance at 0x00D6C7D8>
249     >>> prodCount.count
250     1
251     >>> noProdCount = NinoGenTools.Counter()
252     >>> for x in clientFiles:
253     ... if x in nativeProdFiles:
254     ... prodCount.inc()
255     ... else:
256     ... noProdCount.inc()
257     ...
258     >>> prodCount.count
259     3715
260     >>> noProdCount.count
261     62949
262     >>> test = "manny"
263     >>> test2 = ["m","n","b"]
264     >>> test = "M"
265     >>> if test in test2:
266     ... print yup
267     ...
268     >>> prodCount = NinoGenTools.Counter()
269     >>> noProdCount = NinoGenTools.Counter()
270     >>> for x in clientFiles:
271     ... if x in nativeProdFiles:
272     ... prodCount.inc()
273     ... else:
274     ... noProdCount.inc()
275     >>> for x in clientFiles:
276     ... for i in nativeProdFiles:
277     ... if x.upper() == i.upper():
278     ... prodCount.inc()
279     ... break
280     ...
281     >>> prodCount.count
282     3715
283     >>> prodCount = NinoGenTools.Counter()
284     >>> noProdCount = NinoGenTools.Counter()
285     >>> MasterOutputFile = open(r"c:\test_dir\MasterOutputFile.txt",'w')
286     >>> for x in clientFiles:
287     ... if x in nativeProdFiles:
288     ... prodCount.inc()
289     ... else:
290     ... noProdCount.inc()
291     ... MasterOutputFile.write(x)
292     ...
293     >>> MasterOutputFile.close()
294     >>> MasterOutputFile = open(r"c:\test_dir\MasterOutputFile.txt",'w')
295     >>> prodCount = NinoGenTools.Counter()
296     >>> noProdCount = NinoGenTools.Counter()
297     >>> for x in clientFiles:
298     ... if x[:3] == "\\la":
299     ... parent = x
300     ... else
301     Traceback ( File "<interactive input>", line 4
302     else
303     ^
304     SyntaxError: invalid syntax
305     >>> for x in clientFiles:
306     ... if x[:3] == "\\las":
307     ... parent = x
308     ... else:
309     ... if x in nativeProdFiles:
310     ... prodCount.inc()
311     ... else:
312     ... noProdCount.inc()
313     ... MasterOutputFile.write(parent.replace("\n","") + x)
314     ...
315     Traceback (most recent call last):
316     File "<interactive input>", line 9, in ?
317     NameError: name 'parent' is not defined
318     >>> for x in clientFiles:
319     ... if x[:4] == "\\la":
320     ... parent = x
321     ... else:
322     ... if x in nativeProdFiles:
323     ... prodCount.inc()
324     ... else:
325     ... noProdCount.inc()
326     ... MasterOutputFile.write(parent.replace("\n","") + x)
327     ...
328     Traceback (most recent call last):
329     File "<interactive input>", line 9, in ?
330     NameError: name 'parent' is not defined
331     >>> for x in clientFiles:
332     ... if x[:4] == "\\la":
333     ... parent = x
334     ... else:
335     ... if x in nativeProdFiles:
336     ... prodCount.inc()
337     ... else:
338     ... noProdCount.inc()
339     ... MasterOutputFile.write(parent.replace("\n","") + x)
340     ...
341     Traceback (most recent call last):
342     File "<interactive input>", line 9, in ?
343     NameError: name 'parent' is not defined
344     >>> test = clientFiles[0]
345     >>> test
346     '\\\\lasads01\\data\\cli\\Tetra Tech\\Client Files received 11092007\n'
347     >>> for x in clientFiles:
348     ... if x[:6] == "\\\\la":
349     ... parent = x
350     ... else:
351     ... if x in nativeProdFiles:
352     ... prodCount.inc()
353     ... else:
354     ... noProdCount.inc()
355     ... MasterOutputFile.write(parent.replace("\n","") + x)
356     ...
357     Traceback (most recent call last):
358     File "<interactive input>", line 9, in ?
359     NameError: name 'parent' is not defined
360     >>> for x in clientFiles:
361     ... if x[:6] == "\\\\lasa":
362     ... parent = x
363     ... else:
364     ... if x in nativeProdFiles:
365     ... prodCount.inc()
366     ... else:
367     ... noProdCount.inc()
368     ... MasterOutputFile.write(parent.replace("\n","") + x)
369     ...
370     Traceback (most recent call last):
371     File "<interactive input>", line 9, in ?
372     NameError: name 'parent' is not defined
373     >>> for x in clientFiles:
374     ... if x[:6] == "\\\\lasa":
375     ... parent = x
376     ... else:
377     ... if x in nativeProdFiles:
378     ... prodCount.inc()
379     ... else:
380     ... noProdCount.inc()
381     ... MasterOutputFile.write(parent.replace("\n","") + x)
382     ...
383     >>> prodCount.count
384     3715
385     >>> noProdCount.count
386     62951
387     >>>
388     >>> MasterOutputFile.close()
389     >>> import NinoGenTools
390     >>> test = NinoGenTools.Counter()
391     >>> print counter.count
392     Traceback (most recent call last):
393     File "<interactive input>", line 1, in ?
394     NameError: name 'counter' is not defined
395     >>> print test.count
396     1
397     >>> test.inc
398     <bound method Counter.inc of <NinoGenTools.Counter instance at 0x00D76C88>>
399     >>> startDir = "\\lasads01\data\cli\Tetra Tech\ADMIN"
400     >>> absFile = "\\lasads01\data\cli\Tetra Tech\ADMIN\Client Files received 11092007\MMI Fort Collins Avalon Files\181035\181035 master file list.xls"
401     >>> path, outputFile = os.path.split(absFile)
402     >>> path
403     '\\lasads01\\data\\cli\\Tetra Tech\\ADMIN\\Client Files received 11092007'
404     >>> dir = path.split(startDir)[1]
405     >>> dir
406     '\\Client Files received 11092007'
407     >>> import os
408     >>> outputFile = open(r"c:\test.txt",'w')
409     >>> for file in os.listdir(r"\\Ercdis20\DIS01\C_D\54168095\PROD\01.30.08\MOLLY_KERR\Natives\Attach-000000"):
410     ... outputFile.write(os.path.splitext()[0] + "\n")
411     ...
412     Traceback (most recent call last):
413     File "<interactive input>", line 2, in ?
414     TypeError: splitext() takes exactly 1 argument (0 given)
415     >>> for file in os.listdir(r"\\Ercdis20\DIS01\C_D\54168095\PROD\01.30.08\MOLLY_KERR\Natives\Attach-000000"):
416     ... outputFile.write(os.path.splitext(file)[0] + "\n")
417     ...
418     >>> outputFile.close()
419     >>>