Skip to main content

ZJS Python Tool

Project description

ZJS_Tool => v0.1.0 -> 20251222

主函数前置代码 (Preceding Code of Main Function)

1. 获取程序基础路径 (Get_Base_Path)

  • 功能:获取当前程序的根目录路径 (可用于pyinstall下的根目录定义) 。
  • 参数说明:
    => Main_Path: 主函数路径, 若未传入,自动尝试获取调用者路径
    <= Main_Path (str): 主程序运行的根路径

代码示例:

 >>> Main_Path = os.path.dirname(f"{__file__}")   
 ... Main_Path = os.path.dirname()   

2. 日志配置 (Log_Configuration)

  • 功能:初始化日志实例,定义日志输出格式、存储路径及级别。
  • 参数说明:
    => Main_Path (str): 当前程序的根目录路径
    => log_name (str): 日志名称,用于区分不同模块日志
    <= log (str): 包含 debug / info / warning / error

代码示例:

 >>> log = Log_FCN(Main_Path, "日志名称")   
 >>> log.debug("函数名称“, f"日志内容")   
 ... log.info("函数名称“, f"日志内容")   
 ... log.warning("函数名称“, f"日志内容")   
 ... log.error("函数名称“, f"日志内容")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zjs_tool-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zjs_tool-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file zjs_tool-0.1.0.tar.gz.

File metadata

  • Download URL: zjs_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for zjs_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 452adf7c3a4e3e0ce54ea390cd4d3ae2605245176538165f9c9fce639f57ae65
MD5 90c6f3d48222a840635b0a92a2a53a8e
BLAKE2b-256 ab1bd26a806280e5065c7752ba1bb4cf0a4166642c3b75135b234c650d82fbd7

See more details on using hashes here.

File details

Details for the file zjs_tool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: zjs_tool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for zjs_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d31eddb1c262a45dc8e70ca044d435f4a9a3743cda2ea04f1daac42c7463b4e3
MD5 d84a298fa2f882bcbc385faee06611ce
BLAKE2b-256 927efa17b1f057c661c6df95e96bcde069afe61b916061b6d8af31a21dd4955d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page