-
check file Existing with Python Script
Are there any way to check the file existence in Python script.
-
Python provides exists() function which can be used like below.
import os.path
if(os.path.exists("/etc/passwd")):
print("/etc/passwd exists")
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|