[Tutor] if file == exists, then dont copy it

Sean 'Shaleh' Perry shalehperry@home.com
Sat, 24 Nov 2001 13:22:00 -0800 (PST)


> 
> The code looks like this:
>     from os.path import exists
>     verbose=1 # is it here?
>     force=0   # are whe gonna force? noo
>     if exists(config_file_name) and not force:
>         if verbose: print file, ' is already created'
>         else:
>             print "copying file"
>             os.system('cp MYFILE ' + config_file_name)
> 
> 
> 
> The program seem to skip everything after force=0 and
> then exit.
> 

Not sure if this is your email client or your code, but the else should be
under the first if, not the second one.