MCPcopy Create free account
hub / github.com/geekcomputers/Python / change_ext

Method change_ext

Windows_Wallpaper_Script/wallpaper_extract.py:54–65  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

52 # A method to Change all the Extensions
53 @staticmethod
54 def change_ext():
55 w = Wallpaper
56 w.time_gap("Changing Extensions")
57 # Look into all the files in the executing folder and change extension
58 for filename in os.listdir(w.file_urls["wall_dst"]):
59 base_file, ext = os.path.splitext(filename)
60 if ext == "":
61 if not os.path.isdir(w.file_urls["wall_dst"] + filename):
62 os.rename(
63 w.file_urls["wall_dst"] + filename,
64 w.file_urls["wall_dst"] + filename + ".jpg",
65 )
66
67 # Remove all files Not having Wallpaper Resolution
68 @staticmethod

Callers 1

exec_allMethod · 0.80

Calls 1

time_gapMethod · 0.80

Tested by

no test coverage detected