helpers

Utility functions.

picage.helpers.get_sp_dir()[source]

Get the absolute path of the site-packages directory.

picage.helpers.SP_DIR = '/home/docs/checkouts/readthedocs.org/user_builds/picage/envs/latest/lib/python3.8/site-packages'

Current system’s site-packages directory..

picage.helpers.is_valid_package_module_name(name)[source]

Test whether it’s a valid package or module name.

  • a-z, 0-9, and underline

  • starts with underline or alpha letter

valid:

  • a

  • a.b.c

  • _a

  • _a._b._c

invalid:

  • A

  • 0

  • .a

  • a#b

picage.helpers.assert_is_valid_name(name, error=None)[source]

Make sure the name is a valid package or module name.