file Error

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Thu May 3 09:09:34 EDT 2007


En Thu, 03 May 2007 09:39:37 -0300, <saif.shakeel at gmail.com> escribió:

> Hi,
>     I am parsing an xml file,and using raw_input command to ask the
> user to enter the file name.Ex
>
>>>>
> Enter The ODX File Path:
>
> Suppose my code does not work properly,then in the python idle window
> it shows something like this:
> [...traceback...]
>                 I want the inputfile prompt to appear regardless of
> the error condition.I dont know where the problem lies.Can someone
> help me out.

- IDLE is a development environment - don't use it to actually run your  
program in production.

- Instead of asking the user to type the file name, accept it as a  
parameter, that's what almost everyone else does in the world... It has  
many advantages: you can associate your program with the filename  
extension, you can use the "Send to..." menu, you can run it inside a  
batch file, you can drop a file over your program to be processed, etc.

-- 
Gabriel Genellina



More information about the Python-list mailing list