python中rim的用法_auxly-Python库,用于常见的类shell脚本任务。-Jeff Rimko

Auxly是一个Python库,适用于编写类似shell脚本的任务。它简化了标准库中常见任务的操作,如文件复制,并允许在操作失败时不抛出异常,而是静默失败。此库旨在减少样板代码并提供更直观的API。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

作者:Jeff Rimko

### 作者邮箱:jeffrimko@gmail.com

### 首页:https://github.com/jeffrimko/Auxly

### 文档:None

### 下载链接

|License| |Build Status|

Introduction

This project provides a Python 2.7/3.x library for common tasks especially when writing shell-like scripts. Some of the functionality overlaps with the standard library but the API is slightly modified.

The goal of this project is to leverage the straightforward, clean syntax of Python while avoiding some of the boilerplate code that might be necessary when using the standard library. Functions that overlap with the standard library are designed to do what you would reasonably expect (POLA __) and, when necessary, fail without throwing exceptions.

Please note when using this library that operations will fail silently. This is a deliberate design decision. However, there is often a way to check if an operation has failed and optionally throw and exception if that is desirable:

.. code:: python

auxly.filesys.copy("foo.txt", "bar") or auxly.throw() # Throws/raises exception on failure.

Auxly provides the following modules:

auxly __

auxly.filesys __

auxly.shell __

auxly.stringy __

auxly.listy __

The following are basic examples of Auxly (all examples can be found here __):

examples/delete_pyc.py __

Deletes all PYC files in the project.

examples/guess_os.py __

Attempts to guess the host OS based on available shell commands.

Refer to the unit tests here __ for additional examples.

Status

Currently, this project is in the development release stage. While this project is suitable for use, please note that there may be incompatibilities in new releases.

Release notes are maintained in the project changelog __.

Requirements

Auxly should run on any Python 2.7/3.x interpreter without additional dependencies.

Installation

Auxly can be installed with pip using the following command: pip install auxly

Additionally, Auxly can be installed from source by running: python setup.py install

Documentation

The full documentation for this project can be found here on Read the Docs __.

Similar

The following projects are similar and may be worth checking out:

Reusables __

.. |License| image:: http://img.shields.io/:license-mit-blue.svg .. |Build Status| image:: https://travis-ci.org/jeffrimko/Auxly.svg?branch=master

Copy from pypi.org

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值