Monday, 11 July 2016

linux - How to check if command line argument is file or not in python?

I want to give input as



%>Python_script_name listed_files



How to check if exist as file or it is some input argument.






Please share the small script, by which I can check if command line argument is valid file or it is a simple variable to be processed.



Just to summarize, I need to process my script so as to take or a single argument at command line.




Please help.



Thanks in advance.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...