I want to use a wildcard that I want to shell with Python remove

import glob, os
test = '/path/*'
r = glob.glob(test)
for i in r:
   os.remove(i)

http://stackoverflow.com/questions/1039711/remove-all-files-in-a-directory#answer-1039747

Recommended Posts

I want to use a wildcard that I want to shell with Python remove
I want to use MATLAB feval with python
I want to make a game with Python
I want to use Temporary Directory with Python2
I want to write to a file with Python
I want to work with a robot in python.
I want to run a quantum computer with Python
I want to debug with Python
[Python] I want to use the -h option with argparse
I want to use a virtual environment with jupyter notebook!
[Python] I want to add a static directory with Flask [I want to use something other than static]
[Python] I want to use only index when looping a list with a for statement
[Mac] I want to make a simple HTTP server that runs CGI with Python
I want to use jar from python
I want to build a Python environment
I want to analyze logs with Python
I want to play with aws with python
[Python] A memo that I tried to get started with asyncio
I want to do a full text search with elasticsearch + python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I want to create a window in Python
I want to use ceres solver from python
I don't want to use -inf with np.log
#Unresolved I want to compile gobject-introspection with Python3
I want to use ip vrf with SONiC
I want to solve APG4b with Python (Chapter 2)
[Python] I made a decorator that doesn't seem to have any use.
I want to identify the alert email. --Is that x a wildcard? ---
I want to embed a variable in a Python string
I want to iterate a Python generator many times
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to transition with a button in flask
String manipulation with python & pandas that I often use
I want to handle optimization with python and cplex
I want to climb a mountain with reinforcement learning
I want to create a priority queue that can be updated in Python (2.7)
I tried to draw a route map with Python
I want to write in Python! (2) Let's write a test
I want to randomly sample a file in Python
I want to inherit to the back with python dataclass
I want to split a character string with hiragana
I want to exe and distribute a program that resizes images Python3 + pyinstaller
[Python] I want to make a nested list a tuple
I tried to automatically generate a password with Python3
I want to AWS Lambda with Python on Mac!
I want to manually create a legend with matplotlib
A memo that I touched the Datastore with python
[ML Ops] I want to do multi-project with Python
If you want to make a discord bot with python, let's use a framework
A story that I was addicted to when I made SFTP communication with python
I want to use the R dataset in python
I want to bind a local variable with lambda
I want to use a python data source in Re: Dash to get query results
I want to tell people who want to import from a higher directory with Python direnv
Solution when you want to use cv_bridge with python3 (virtualenv)
I want to be able to analyze data with Python (Part 3)
I want to remove Python's Unresolved Import Warning with vsCode
I want to use R functions easily with ipython notebook
I want to specify another version of Python with pyvenv
I want to be able to analyze data with Python (Part 1)
I made a package to filter time series with python