Skip to main content

Library functions to support pythonizer

Project description

perllib

https://img.shields.io/pypi/v/perllib.svg https://img.shields.io/travis/snoopyjc/perllib.svg Documentation Status

Library functions to support pythonizer

Features

  • Perl library functions typically return 1 on success and undef on failure, whereas python library functions raise exceptions on failure. Also, perl automatically converts variables from strings to numbers and vice-versa when referenced in the appropriate context. In perl, global variables are truly global across files and are organized by package name, where in python global variables have file scope. In addition, perl has autovivification, which means that arrays and hash tables magically appear out of whole cloth when referenced. This library supports all of those features and allows the “pythonizer” perl to python translator generate code that is fairly readable.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.963 (2022-03-09)

  • Add _chop_global, _chomp_global, _chop_element, _chomp_element

0.962 (2022-03-09)

  • Hot fix for _fileinput_next - errors on Python older than v3.10

0.961 (2022-03-02)

  • Handle open layer pragmas, fix issue with translate and friends with squash option, add dclone, catfile, file_name_is_absolute, Dumper, don’t raise exception on double close

0.960 (2022-02-28)

  • Speed up ArrayHash and Num. Have add_element and subtract_element handle non-numeric elements, turn subprocess shell=False on windows unless the command contains cmd shell chars or is a cmd built-in, fixup open of /tmp/… on windows to use the windows tempdir, don’t pass effective_ids=True on windows. Have concat_element auto-convert everything to strings.

0.959 (2022-02-24)

  • str(ArrayHash()) changed to give ‘’ instead of [], add EVAL_ERROR global variable, have ArrayHash() + or += work on empty value

0.958 (2022-02-23)

  • Don’t give a close failed error on a pipe which got automatically closed, give empty result for keys(), values(), and items() on a fresh ArrayHash instead of AttributeError

0.957 (2022-02-22)

  • Add list_to_hash function to process key/value pairs

0.956 (2022-02-21)

  • Implement all options of translate (tr///)

0.955 (2022-02-19)

  • Fix split: A zero-width match at the beginning of EXPR never produces an empty field, fix bootstrapping issues

0.954 (2022-02-17)

  • Add -n: trace run, fix issue of scalar being initialized as an array

0.953 (2022-02-15)

  • First release on PyPI.

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

perllib-0.963.tar.gz (39.4 kB view details)

Uploaded Source

Built Distributions

perllib-0.963-py3.10.egg (61.3 kB view details)

Uploaded Source

perllib-0.963-py2.py3-none-any.whl (32.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file perllib-0.963.tar.gz.

File metadata

  • Download URL: perllib-0.963.tar.gz
  • Upload date:
  • Size: 39.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for perllib-0.963.tar.gz
Algorithm Hash digest
SHA256 aaf10b005c92e9e8247452e66d80a62be795b1724fa430016eeb9f69eb243fa1
MD5 4ee998916702753053485a66fc977b4f
BLAKE2b-256 d05289cf955193272dd43607281581e5179769995f5b098cb64df47a9591350f

See more details on using hashes here.

File details

Details for the file perllib-0.963-py3.10.egg.

File metadata

  • Download URL: perllib-0.963-py3.10.egg
  • Upload date:
  • Size: 61.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for perllib-0.963-py3.10.egg
Algorithm Hash digest
SHA256 4952400a067948c190d80c3e074c59634fcd9b1e1d4fc75e8acbaa960a0810e8
MD5 74be599c43f29039e29d5df9050582a1
BLAKE2b-256 415f12e7ed4061fb21163e02256c1ac036c7918927d7d1b825c5c5203b79762b

See more details on using hashes here.

File details

Details for the file perllib-0.963-py2.py3-none-any.whl.

File metadata

  • Download URL: perllib-0.963-py2.py3-none-any.whl
  • Upload date:
  • Size: 32.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1

File hashes

Hashes for perllib-0.963-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c70615ba956c28fade4c8b3ac9415d037bab2f3a3c132999b0c9e4c5ff0b2596
MD5 26ba583b92d469d89630bf3f05624968
BLAKE2b-256 548908c7b61f00d31dcf6b4ceb605200bbf8cc9f8363e9fe7b60f6c8aaa45521

See more details on using hashes here.

Supported by

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