Accepting input from Command prompt

Sandeep Avinash Gohad gohadbhai at rediffmail.com
Thu Nov 18 08:41:47 CET 2004


  
Hello

I want to take a file name as an input from user on command prompt,
I searched the documentation with "sys.stdin" & "raw_input()"
but by using ("sys.stdin" & "raw_input()") I could not accept the filename.
(maybe the solution was there but the syntax i used was wrong)

fin = open("c:/200411a.abc","rb")
Here If i want to accept "c:/200411a.abc" as an input from user
also want to validate weather the path is correct or not.
and accordingly want to inform user.
please guide me how to do that....

Thanx
Sandeep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20041118/b48ab96f/attachment.html>


More information about the Python-list mailing list