From fb1f17e3597dd387289b408b3aebc8e9f2680a1a Mon Sep 17 00:00:00 2001 From: JSCHILL1 Date: Fri, 3 Apr 2009 13:38:10 -0500 Subject: [PATCH] Ensure input file exists. Create output file (overwriting if necessary). --- scour.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/scour.py b/scour.py index e4f8dc7..ff071dc 100755 --- a/scour.py +++ b/scour.py @@ -22,8 +22,6 @@ # TODOs: # -# 3) Issue error if input.svg does not exist -# 4) Create the output file (issue error if cannot create) # 5) Copy input file text to output file text # 6) Read input file into memory using an XML library # 7) Implement a function that will remove all unreferenced id attributes from @@ -68,4 +66,8 @@ if( outfile == '' ): print 'Error! -o argument is missing' quit() -print 'infile=' + infile + ', outfile=' + outfile +input = open(infile, 'r') +output = open(outfile, 'w') + +input.close() +output.close()