Skip to main content

Simple tools to quickly get the names of multiple variables out of the lines of code where they are defined.

Project description


This package contains the function 'canederlist'

i.e.

Comma
And
NEwline
Delimited
Elements
Reformatted as
LIst of
STrings

which allows to reformat a multiline string containing words separated by commas into a list of strings.

This is useful when we have a list of variables and we want to quickly get a list of their names as strings.


usage
-----

The list of variables (i.e. not the variable containing the list, the hardcoded list of variables) must be copied and pasted as argument of canederlist(), enclosed in triple quotes (""").

The function canederlist will remove
- multiple spaces (double or more, but not single spaces)
- newline characters
- triple points ...
- (if selected in the input) round () and square [] parentheses
- (if selected in the input) single spaces
and split the remaining elements separated by commas into a list of strings.


example
-------

>>>from canederli import canederlist
>>>columns = [ names,
descriptions,
x_coordinates,
y_coordinates ]

>>>columns_labels = canederlist("""
names,
descriptions,
x_coordinates,
y_coordinates
""")

>>>print(columns_labels)
['names', 'descriptions', 'x_coordinates', 'y_coordinates']




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

canederli-0.0.9.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

canederli-0.0.9-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file canederli-0.0.9.tar.gz.

File metadata

  • Download URL: canederli-0.0.9.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for canederli-0.0.9.tar.gz
Algorithm Hash digest
SHA256 07b9c18bc16718ef28e6b9bcab683d9824af1b73c56cbd51814e87b64726cca5
MD5 aa889e1d54d0f0a5c9b241a93e786332
BLAKE2b-256 4b6864b5ba8ac0b048f9611d87de24ae1d1f228b6e82fd1483e8462d1d736df3

See more details on using hashes here.

File details

Details for the file canederli-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: canederli-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for canederli-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 64b87bd34ad3b1335ade222caa8e23133070f6bb2c3ada3503be79ae43e0022c
MD5 57f7593f101453abfed0ac77cd631109
BLAKE2b-256 09fc86e1a4c37160aae59947b6b35455f61e5f2fe3f28d52ba88218487c8853c

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