semvec/pypi-packages huggingface dataset:
CleanIO 0.1.4
Simple IO eliminating the boilerplate.
License: MIT
Requires Python: >=3.8
Keywords: IO, yield

********************
CleanIO Project
********************

CleanIO is a simple project illustrating how to use the yield statement to
make reading and writing text files simple and to remove the clutter and
boilerplate from your mainstream code.

Usage
********

Read a Text File
==================

To read a text file.

    1.  Add an import statement

        ``from cleanio import CleanRead``

    2.  Create an instance of the ``CleanRead`` class and pass it the desired filename or path

        ``cr = CleanRead(<<file name or path>>)``

    3.  Accept each line of the file from the generator (e.g. with a ``for`` statement) from the ``clean_read`` method

        ``for line in cr.clean_read():``

    4.  When the generator finishes, it will return a ``StopIteration`` exception (which the for statement will handle automatically

The file is opened, read, and closed automatically with no extra boilerplate
needed.

Write a Text File
=====================

To write a text file:

    1.  Add an import statement.

        ``from cleanio import CleanWrite``

    2.  Create an instance of the ``CleanWrite`` class and pass it the desired filename or path.

        ``cw = CleanWrite(<<file name or path>>)``

    3.  Send each line of the file to the generator via the ``clean_writeline`` method

        ``cw.clean_writeline(<<line>>)``

    4.  When done, notify the generator

        ``cw.clean_close()``

The file is opened, written, and closed automatically with no extra
boilerplate needed.

Comments
=============

-   Read or write as many files as you need.
-   This has not been tested with async calls.
-   This code has been formatted with the ``blue`` library.

Structure
********************
CleanIO consists of two classes, one for reading a text file and one for
writing a text file.

Each class uses the ``yield`` statement for maintaining the position of the
file and its place in the method.  Other "boilerplate" code, such as the
open, starting the generator, and closing is handled automatically in the
class.

Possible Future Enhancements
===============================

There are several possible enhancement to this module that come to mind.

Currently this module is designed to read and write text files.  It
could be enhanced to also read and write binary files.

Currently the CleanWrite class assumes it will be getting one line at a
time (without the newline or '\\n' at the end).  It could be enhanced to
output partial lines or multiple lines at a time if the user desires to put
the line endings on themselves.
PyPlcnextRsc 0.1.14
RSC Client for PLCnext
License: MIT
Requires Python: >=3.7.6

# PyPLCnextRsc

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Web](https://img.shields.io/badge/PLCnext-Website-blue.svg)](https://www.phoenixcontact.com/plcnext)
[![Community](https://img.shields.io/badge/PLCnext-Community-blue.svg)](https://www.plcnext-community.net)

**PyPLCnextRsc** is a simple ,yet elegant, RSC client library.

PyPLCnextRsc allows you to use RSC service extremely easily:

If you have any questions, please feel free to contact wudonglai@phoenixcontact.com.cn

```python
from PyPlcnextRsc import *
from PyPlcnextRsc.Arp.Plc.Domain.Services import IPlcManagerService, PlcStartKind

if __name__ == "__main__":
    with Device('192.168.1.10', secureInfoSupplier=GUISupplierExample) as device:
        plc_manager_service = IPlcManagerService(device)  # Get PlcManagerService
        plc_manager_service.Stop()
        plc_manager_service.Start(PlcStartKind.Cold)
```

---

## Resources

- [Documentation](https://pyplcnextrsc.readthedocs.io/) comprehensive documentation, tutorials, and examples.

**Recommended to build docs using Python 3.9**

## Environment

This module can be used **Remotely** ( PC,Server,Raspberry Pi ... ) or **Locally** ( on PLCnext device )

Requires: **Python>=3.7.6**

---

## Installing PyPLCnextRsc

```console
$ pip install -U PyPlcnextRsc
```

**Note** current the Pypi is only for test purpose , developers or users should always get latest version
at https://gitlab.phoenixcontact.com/SongYantao/pyplcnextrsc

## How to generate the latest doc ?

```console
$ pip install sphinx>=4.0.2
$ pip install sphinx_rtd_theme==0.5.1
$ cd docs
$ make html

(for zh_CN version : python -m sphinx -T -E -b html -d build_zh_CN/doctrees -D language=zh_CH ./source build_zh_CN/html )
```