python-clu 0.11.2__py3-none-any.whl → 0.11.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
clu/__version__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.11.2'
1
+ __version__ = '0.11.3'
clu/scripts/repl.py CHANGED
@@ -27,10 +27,16 @@ repl.py – THE RUBRICK:
27
27
  from __future__ import print_function
28
28
 
29
29
  import importlib
30
+ import os.path
31
+ import runpy
32
+ import warnings
30
33
 
31
34
  from clu.all import import_clu_modules
35
+ from clu.config.env import Environ
36
+ from clu.constants import consts
32
37
  from clu.naming import nameof, qualified_import
33
38
  from clu.predicates import ispublic
39
+ from clu.repl import columnize
34
40
 
35
41
  # MODULE EXPORT FUNCTIONS: given a module name, export
36
42
  # either the module or its contents into a given namespace:
@@ -190,6 +196,21 @@ else:
190
196
  # I do this practically every time, so I might as well do it here:
191
197
  catimage = Image.open(image_paths[0])
192
198
 
199
+ # Access CLU app environment variables:
200
+ cluenv = Environ(appname='clu')
201
+
202
+ # If you, the user, set up a CLU_USER_SCRIPT environment variable
203
+ # before running this repl script, you can have it executed herein:
204
+ if 'user:script' in cluenv:
205
+ user_script_path = cluenv['user:script']
206
+ if os.path.exists(user_script_path):
207
+ user_script_globals = runpy.run_path(user_script_path)
208
+ GLOBALS.update(user_script_globals)
209
+ else:
210
+ message = "CLU_USER_SCRIPT needs to point to a Python file"
211
+ warnings.simplefilter('always')
212
+ warnings.warn(stacklevel=2, message=message)
213
+
193
214
  # Remove duplicate and invalid sys.paths:
194
215
 
195
216
  pypath.remove_invalid_paths()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-clu
3
- Version: 0.11.2
3
+ Version: 0.11.3
4
4
  Summary: CLU - Common Lightweight Utilities, or Command-Line Utilities (your pick)
5
5
  Home-page: https://github.com/fish2000/clu
6
6
  Download-URL: https://github.com/fish2000/clu/zipball/master
@@ -1,6 +1,6 @@
1
1
  clu/__init__.py,sha256=b8oH0ccvPZhHj6Hx9KmvQJu-Ic5MWj2PqUNyWgHPxsg,2106
2
2
  clu/__main__.py,sha256=ZLTfX6fCcimhzwZZVKaTk1LiLUtq2edMWAicGxWtKQA,4170
3
- clu/__version__.py,sha256=vtk66IyDqY61RqB895BRx8H4BfUE-Y8TUhoM8EEdDII,22
3
+ clu/__version__.py,sha256=tNsyISTyyxGLRbA5X0JEH0LDam6HmE3_VXXX73ubpsg,22
4
4
  clu/abstract.py,sha256=Ya7deSpczSCTZy_d5tEx_HyK3VQ4aW6iK-t6RiPZjBQ,13491
5
5
  clu/all.py,sha256=1Dhdufjubi4elC8x95lhevRUdwL_YsOdJC5Q2U5B-j0,3102
6
6
  clu/application.py,sha256=EqgTw2wMlvSx-dmSOcgJVPqu4jwzsP06egmvuzuyEmo,6062
@@ -74,7 +74,7 @@ clu/scripts/ansicolors.py,sha256=u0nJhEC1cHnjYihkxAlfs80drbyAa7YxdvDvl9mcG4E,262
74
74
  clu/scripts/boilerplate.py,sha256=sAn9LaCh0mZqRvI_lsSK8eDoRhHigR3MU87HLDStR2Q,727
75
75
  clu/scripts/dictroast.py,sha256=E4qNwTPLrbj2914NediV7LHzia9IM2flsCGtaLSTXg0,5583
76
76
  clu/scripts/prediversus.py,sha256=063qT-A7I4po_N9GpafQLAJxglphaJatQIDG2t6jw0s,5173
77
- clu/scripts/repl.py,sha256=8qTN-bOfvpZOzRsel9Wt2U2CrXlR1ZUsANFaYIbZiy8,6464
77
+ clu/scripts/repl.py,sha256=yJPXdly8wYAHww9ltTz6q0M1OdDN8HFM3ZpHDkAEjtw,7207
78
78
  clu/scripts/treeline.py,sha256=kv7yvsNgO0GVY8gLRrbg4bTB1owXinwrV4otx-MGaYY,31427
79
79
  clu/scripts/legacy/forkumask.py,sha256=Q4atVqiX8ERNoe4rfv6qCU8RMlxbvAvsHn4p0g8uG5I,1847
80
80
  clu/scripts/legacy/repl-bpython.py,sha256=FqDi_3VL27qX8FK4pF2cI1i_9AsbYsIosJ2K8hOoPlQ,21120
@@ -97,11 +97,11 @@ clu/version/__init__.py,sha256=JPM3y55fTL5D9l0AzJ_2esPgLRWHSKqvV4NYwkGzbKE,8775
97
97
  clu/version/__main__.py,sha256=pFWGzpcVNQegMhB_I6xO3hvR3xIhlVnHYVJ54wvxSH8,268
98
98
  clu/version/git_version.py,sha256=snh4lHsY4EoFRH0bh--Htequw9eJSfRI2zueUG573gY,1745
99
99
  clu/version/read_version.py,sha256=_bBVNy48o5DWmvcDOawINeux2oSIQMFXBZJ9SQ5p4WQ,3879
100
- python_clu-0.11.2.dist-info/licenses/COPYING.md,sha256=llYAasj2CkLS5mcJ7eRisHzPx_EUig0iG-awvVW-gLg,1719
101
- python_clu-0.11.2.dist-info/licenses/LICENSE.txt,sha256=xxq-ZV5xvCrohv6DMqkvl9NCaMtFRtVqeOSMelulhdE,1828
102
- python_clu-0.11.2.dist-info/METADATA,sha256=FDbx4kw_L8UOtfe0XHEvp3ViwqVfahJ2Ihi5ofjsQig,2741
103
- python_clu-0.11.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
104
- python_clu-0.11.2.dist-info/entry_points.txt,sha256=gHmvIG1rglS0xjrB9O1AC6SspAL8Vl5NTet-2oyce40,256
105
- python_clu-0.11.2.dist-info/top_level.txt,sha256=OKMcaFrtzEJat-RA3KEqUOiemjFjZRhBFOr6_QqL7gQ,4
106
- python_clu-0.11.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
107
- python_clu-0.11.2.dist-info/RECORD,,
100
+ python_clu-0.11.3.dist-info/licenses/COPYING.md,sha256=llYAasj2CkLS5mcJ7eRisHzPx_EUig0iG-awvVW-gLg,1719
101
+ python_clu-0.11.3.dist-info/licenses/LICENSE.txt,sha256=xxq-ZV5xvCrohv6DMqkvl9NCaMtFRtVqeOSMelulhdE,1828
102
+ python_clu-0.11.3.dist-info/METADATA,sha256=A4giZo3B8xpTNNyI4c-_J9TQ9UFmeWer-5KbeESBQuA,2741
103
+ python_clu-0.11.3.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
104
+ python_clu-0.11.3.dist-info/entry_points.txt,sha256=gHmvIG1rglS0xjrB9O1AC6SspAL8Vl5NTet-2oyce40,256
105
+ python_clu-0.11.3.dist-info/top_level.txt,sha256=OKMcaFrtzEJat-RA3KEqUOiemjFjZRhBFOr6_QqL7gQ,4
106
+ python_clu-0.11.3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
107
+ python_clu-0.11.3.dist-info/RECORD,,