import os
import os.path
for dirpath, dirnames, filenames in os.walk("."):
for filename in [f for f in filenames if f.endswith(".log")]:
print os.path.join(dirpath, filename)
More Related Contents:
- How to convert list containing string of elemet to list in python [closed]
- Execute multiple commands in Paramiko so that commands are affected by their predecessors
- Pygame mask collision
- When are objects garbage collected in python?
- Generating random dates within a given range in pandas
- How to give column name dynamically from string variable in sql alchemy filter?
- How to sort a list by length of string followed by alphabetical order?
- mixed slashes with os.path.join on windows
- How to add a custom loglevel to Python’s logging facility
- Do you use the “global” statement in Python? [closed]
- glob exclude pattern
- How to change fonts in matplotlib (python)?
- Image Processing, In Python? [closed]
- python import multiple times
- Preserve custom attributes when pickling subclass of numpy array
- When are .pyc files refreshed?
- How can I create a ramdisk in Python?
- How to delete an item in a list if it exists?
- pandas: replace string with another string
- Python multiprocess profiling
- Python Pandas merge only certain columns
- How to make a 3D scatter plot in matplotlib
- How to open external programs in Python
- Call exiftool from a python script?
- Unit testing a python app that uses the requests library
- Why don’t I get any syntax errors when I execute my Python script with Perl?
- Use tqdm with concurrent.futures?
- Can I use the variable name “type” as function argument in Python?
- Capture makes remaining patterns unreachable
- Python long filename support broken in Windows