Sunday, 27 August 2017

python - How to check if an argv refers to an existing file in python2.7?

I know how to check whether required arguments are given on the command line. But how do I check whether the given argument on the command line actually refers to an existing file in the folder I'm running the code in?



I'm trying to incorporate this verification in order to save time by skipping parts of my code in case the file cannot be referenced to.

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...