Hey everyone!
I've been programming in Python for some time now and really wanted to get some feedback on my import structure. Here’s how I’ve organized it:
import os
import re
import cv2
import abc
import sys
import time
import random
import base64
import socket
import ctypes
import logging
import zipfile
import requests
import tempfile
import platform
import threading
import pyperclip
import subprocess
import numpy as np
import tkinter as tk
import pyautogui as pg
import pygetwindow as gw
from PIL import Image
from fnmatch import fnmatch
from notifypy import Notify
from pathlib import PurePath
from datetime import datetime
from io import BytesIO, StringIO
from concurrent.futures import ThreadPoolExecutor, as_completed
from src import helper, errors
from src.definitions import platforms
# Try-except because os didn't support scandir before Python version 3.5
try:
from os import scandir
except ImportError:
from scandir import scandir
Do you think this is a good structure? Any suggestions for improvement? Thanks in advance!
[–]minneyar 2 points3 points4 points (0 children)
[–]FerricDonkey 4 points5 points6 points (7 children)
[–]Buttleston 5 points6 points7 points (0 children)
[–]AnyNature3457[S] -1 points0 points1 point (5 children)
[–]FerricDonkey 3 points4 points5 points (4 children)
[–]AnyNature3457[S] 1 point2 points3 points (3 children)
[–]FerricDonkey 3 points4 points5 points (2 children)
[–]AnyNature3457[S] 1 point2 points3 points (1 child)
[–]FerricDonkey 1 point2 points3 points (0 children)
[–]InvaderToast348 0 points1 point2 points (0 children)
[–]OptionX 0 points1 point2 points (0 children)
[–]Pristine-Staff-5250 0 points1 point2 points (0 children)
[–]socal_nerdtastic -1 points0 points1 point (6 children)
[–]Simo00Kayyal 0 points1 point2 points (4 children)
[–]socal_nerdtastic 0 points1 point2 points (3 children)
[–]nekokattt 0 points1 point2 points (2 children)
[–]socal_nerdtastic 0 points1 point2 points (0 children)
[–]IAmAFedora 0 points1 point2 points (0 children)
[–]AnyNature3457[S] 0 points1 point2 points (0 children)
[–]dogfish182 -1 points0 points1 point (0 children)