Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

glob list all files in directory

import glob, os
os.chdir("/mydir")
for file in glob.glob("*.txt"):
    print(file)
Comment

PREVIOUS NEXT
Code Example
Python :: python save output to file 
Python :: rum system commands python 
Python :: pandas dataframe column names 
Python :: Concatenate strings from several rows using Pandas groupby 
Python :: how to get decimal part of a double in python 
Python :: pandas groupby percentile 
Python :: python hello world program 
Python :: python remove first item in tuple 
Python :: python delete white spaces 
Python :: get table selenium python pandas 
Python :: python selenium web scraping example 
Python :: django and operator 
Python :: pandas read column in date format 
Python :: reverse text python 
Python :: pandas xlsx to dataframe 
Python :: how to delete all item in treeview tkinter 
Python :: how to get synonyms of a word in python 
Python :: beautifulsoup remove element 
Python :: reverse geocoding python 
Python :: python time wait 
Python :: python fibonacci 
Python :: remove spaces from string python 
Python :: Changing the number of ticks on a Matplotlib plot axis 
Python :: embed discord.py 
Python :: int to list python 
Python :: make blinking text python1 
Python :: images in django 
Python :: pillow rgb to grayscale 
Python :: only size-1 arrays can be converted to Python scalars 
Python :: pandas filter dataframe 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =