Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to see directory from os module

import os

# detect the current working directory
path = os.getcwd()

# read the entries
with os.scandir(path) as listOfEntries:
    for entry in listOfEntries:
        # print all entries that are files
        if entry.is_file():
            print(entry.name)
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #directory #os #module
ADD COMMENT
Topic
Name
1+9 =