Answers for "get file arg0 python"

0

get file arg0 python

import os
import sys

fn = sys.argv[1]
if os.path.exists(fn):
    print os.path.basename(fn)
    # file exists
Posted by: Guest on November-11-2020

Python Answers by Framework

Browse Popular Code Answers by Language