globals() access anywhere. "We Do Anything, Anytime"
Project description
Easy access to globals() from inside a python module.
Using superglobals
import superglobals
from superglobals import *
superglobals()[var] = value
setglobal('test', 123)
defaultglobal('test', 456)
assert(getglobal('test') == 123)
setglobal('a.b.c', 7)
> a['b']['c'] == 7
setglobal('a\.b\.c', 8)
> globals()['a.b.c'] == 8
Changelog
0.0.10: initial release (2021-09-02) 0.0.13: added dotted object heirachy expansion (2021-09-13)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
superglobals-0.0.14.tar.gz
(2.5 kB
view hashes)