Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var1='C:/my/store/path'
- myimage_1010_im.png
- myimage_1010_im1.png
- myimage_1010_im3.png
- myimage_1020_im.png
- myimage_1020_im1.png
- var1='C:/my/store/path/myimage_1010_im.png'
- import os
- cwd = os.getcwd()
- my_file='1010'
- path = os.path.join(cwd, my_file)
- import glob
- var1='C:/my/store/path/*'
- paths = glob.glob(var1)
- my_file='1010'
- selected_path = filter(lambda x: my_file in x, paths)
Add Comment
Please, Sign In to add comment