code stringlengths 3 6.57k |
|---|
exception_handler(exc, {}) |
isinstance(response, Response) |
test_non_api_exception_handler_returns_response(self) |
self.settings(DEBUG_PROPAGATE_EXCEPTIONS=False) |
Exception() |
exception_handler(exc, {}) |
isinstance(response, Response) |
test_api_exception_handler_with_propagation(self) |
self.assertRaises(APIException) |
self.settings(DEBUG_PROPAGATE_EXCEPTIONS=True) |
APIException() |
exception_handler(exc, {}) |
test_exception_handler_404_with_propagation(self) |
self.assertRaises(Http404) |
self.settings(DEBUG_PROPAGATE_EXCEPTIONS=True) |
Http404() |
exception_handler(exc, {}) |
test_exception_handler_403_with_propagation(self) |
self.assertRaises(PermissionDenied) |
self.settings(DEBUG_PROPAGATE_EXCEPTIONS=True) |
PermissionDenied() |
exception_handler(exc, {}) |
test_non_api_exception_handler_with_propagation(self) |
self.assertRaises(KeyError) |
self.settings(DEBUG_PROPAGATE_EXCEPTIONS=True) |
KeyError() |
exception_handler(exc, {}) |
os.path.basename(sys.argv[0]) |
os.path.join(os.environ['APPDATA'], "QuentiumPrograms") |
format(__filename__) |
urllib.request.urlopen("https://www.google.fr/", timeout=1) |
os.path.exists(__iconpath__) |
os.mkdir(__savepath__) |
urllib.request.urlretrieve("https://quentium.fr/+++PythonDL/{}.ico".format(__filename__) |
int(urllib.request.urlopen("https://quentium.fr/programs/index.php") |
read() |
decode() |
split(__filename__ + "<!-- Version: ") |
split(" --></h2>") |
os.path.exists(__iconpath__) |
Tk() |
popup.attributes("-topmost", 1) |
popup.iconbitmap(__iconpath__) |
popup.withdraw() |
askquestion(__filename__ + " V" + str(script_version) |
os.rename(__basename__, __filename__ + "-old.exe") |
os.remove(__filename__ + "-old.exe") |
os.rename(__basename__, __filename__ + "-old.exe") |
str(__basename__) |
urllib.request.urlretrieve("https://quentium.fr/download.php?file={}-32.exe".format(__filename__) |
urllib.request.urlretrieve("https://quentium.fr/download.php?file={}.exe".format(__filename__) |
showwarning(__filename__, "Le programme va redémarrer pour fonctionner sous la nouvelle version.", icon="warning") |
os.system("start " + __filename__ + ".exe") |
os._exit(1) |
str(__version__) |
start_rename() |
askdirectory() |
askyesno(__filename__, "Êtes-vous sûr de renommer toutes les images dans ce dossier ? Cette action ne peux pas être annulée !") |
os.listdir(directory) |
lower() |
in (".jpg",".JPG",".png",".PNG",".jpeg",".JPEG",".bmp",".gif") |
for (index, filename) |
enumerate(files1) |
os.path.splitext(filename) |
check_var.get() |
os.path.getctime(file) |
check_var.get() |
os.path.getmtime(file) |
datetime.fromtimestamp(time1) |
time2.strftime("%Y%m%d%H%M%S%f") |
str(os.path.getsize(file) |
os.rename(file, directory + "/" + newname) |
os.listdir(directory) |
lower() |
in (".jpg",".JPG",".png",".PNG",".jpeg",".JPEG",".bmp",".gif") |
for (index, filename) |
enumerate(files2) |
os.path.splitext(filename) |
os.path.exists(newname) |
os.rename(file, directory + "/" + newname) |
imagerenaming.destroy() |
os._exit(0) |
showwarning(__filename__, "Erreur : Aucun dossier n'a été sélectionné !") |
Tk() |
imagerenaming.update_idletasks() |
imagerenaming.winfo_screenwidth() |
imagerenaming.winfo_screenheight() |
imagerenaming.geometry("{}x{}+{}+{}".format(width , height, int(x) |
int(y) |
imagerenaming.resizable(width=False, height=False) |
imagerenaming.configure(bg = "lightgray") |
os.path.exists(__iconpath__) |
imagerenaming.iconbitmap(__iconpath__) |
imagerenaming.title(__filename__) |
Label(imagerenaming, text="Bienvenue dans le programme de renommage !", font="impact 30", fg="red", bg="lightgray") |
pack(pady=60) |
IntVar() |
check_var.set(0) |
Radiobutton(imagerenaming, text="Date de création", variable=check_var, value=0, font="impact 20", bg="lightgray") |
pack(pady=10) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.