On 05/05/14 04:13, Jake Blank wrote:

I did have one more question though.

import os
from wordtools import extract_words

source_filepath=input("Enter the path to the source file:")
dest_filepath =input("Enter the path to the destination file:")

I'm wondering how I can make it so the program can tell if the
source/dest_filepath the user entered is actually a program on the computer.

Do you really mean is it a program? - ie an executable file? Or do you just want to know if the file (any kind of file) exists?

There are ways to do what you want but you need to be much more specific.


Also i have to ask the user if they would like to "process another
file(Y/N)?" and I'm not sure where to put that.

You need a loop. It will look something like(pseudo code)

while True:
   you existing copy code here
   ask the user if they want to do more
   if they don't:
      break  # exit the loop

HTH
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to