Skip to main content

Installation

pip install pnu-anagram

ANAGRAM(6)

NAME

anagram - rearrange letters to form new words

SYNOPSIS

anagram [-d|--dictionary pathname] [-l|--length numbers] [--debug] [--help|-?] [--version] [--] [letters]

DESCRIPTION

The anagram utility rearranges the given letters to form as many words (anagrams) as possible.

Standard input is read if no letters are provided on the command line.

The -l|--length option can be used to form words of selected size with the letters provided.

OPTIONS

Options Use
-d--dictionary pathname Use this dictionary pathname if you don't want the default dictionary
-l|--length numbers Specify anagrams lengths if you want intermediate sizes. numbers is a number or a comma separated list of numbers or dash separated number intervals
--debug Enable debug mode
--help|-? Print usage and a short help message and exit
--version Print version and exit
-- Options processing terminator

ENVIRONMENT

The ANAGRAM_DEBUG environment variable can also be set to any value to enable debug mode.

The DICTPATH environment variable is the search path for the dictionary files. It is a colon-separated list of directories in which anagram looks for a words dictionary file. If not set it will default to /usr/share/dict:/usr/local/share/dict. Under a Posix system, $HOME/.local/share/dict will also be added to the default, while %HOMEPATH%/appdata/roaming/python/share/dict:%HOMEPATH%/appdata/local/programs/python/pythonXX/share/dict will be added under a Windows system.

The ANAGRAM_DICT environment variable provides a way to avoid specifying an alternate directory on each command line.

FILES

/usr/share/dict/words is the default (English) dictionary on a BSD operating system.

A French dictionary is also installed as a dependency.

EXIT STATUS

The anagram utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

To solve a Wordscapes (French) level where the available letters are ABCDEFG, I use a command like:

$ export ANAGRAM_DICT=/usr/local/share/dict/dict-fr-ABU-mots_communs.ascii
$ anagram -l 3-7 abcdefg

SEE ALSO

grep(1)

STANDARDS

The anagram utility is not a standard UNIX command.

This utility tries to follow the PEP 8 style guide for Python code.

HISTORY

This utility was made for the PNU project in order to help my wife play Wordscapes when she was stuck on a level.

LICENSE

It is available under the 3-clause BSD license.

AUTHORS

Hubert Tournier

CAVEATS

An English dictionary should be packaged for operating systems that are not providing one.

Searching only for a words link to one of the directories in the DICTPATH is too limitated.

Metadata

Release files for pnu-anagram 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pnu-anagram 1.0.0
File Size Uploaded
pnu_anagram-1.0.0.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pnu-anagram 1.0.0
File Interpreter ABI Platform
pnu_anagram-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.7 kB

Release files / pnu_anagram-1.0.0.tar.gz

Download URL pnu_anagram-1.0.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
94286c8fc6b56613ee204d652cf4ecea5d23e9f1c415b2aceb77f061394b6f72
BLAKE2b-256 checksum
How to use checksums
66ecd6fcad79e97b2effe4836f5e7e58bceb1bac7a60b40921c19f4110850ac0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11

Release files / pnu_anagram-1.0.0-py3-none-any.whl

Download URL pnu_anagram-1.0.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a19335527d2d02726a1497be43a08f94fc6323038ab127642079047317b438f1
BLAKE2b-256 checksum
How to use checksums
570c74831383fcef0f63c35259ac349e0f647d97e6972abad50108ae4c0beda2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.8.11

Release history Release notifications | RSS feed

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.0

2 release files

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page