bisos.b 0.2__tar.gz

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.
Files changed (58) hide show
  1. bisos.b-0.2/MANIFEST.in +6 -0
  2. bisos.b-0.2/PKG-INFO +64 -0
  3. bisos.b-0.2/README.rst +42 -0
  4. bisos.b-0.2/TITLE.txt +2 -0
  5. bisos.b-0.2/bin/csExamples.cs +435 -0
  6. bisos.b-0.2/bisos/__init__.py +1 -0
  7. bisos.b-0.2/bisos/b/__init__.py +77 -0
  8. bisos.b-0.2/bisos/b/ast.py +509 -0
  9. bisos.b-0.2/bisos/b/b_io/__init__.py +31 -0
  10. bisos.b-0.2/bisos/b/b_io/ann.py +152 -0
  11. bisos.b-0.2/bisos/b/b_io/eh.py +542 -0
  12. bisos.b-0.2/bisos/b/b_io/io.py +105 -0
  13. bisos.b-0.2/bisos/b/b_io/k1-eh.py +479 -0
  14. bisos.b-0.2/bisos/b/b_io/log.py +477 -0
  15. bisos.b-0.2/bisos/b/b_io/out.py +143 -0
  16. bisos.b-0.2/bisos/b/b_io/stderr.py +108 -0
  17. bisos.b-0.2/bisos/b/b_io/stdin.py +110 -0
  18. bisos.b-0.2/bisos/b/b_io/stdout.py +98 -0
  19. bisos.b-0.2/bisos/b/b_io/tm.py +167 -0
  20. bisos.b-0.2/bisos/b/clsMethod_csu.py +293 -0
  21. bisos.b-0.2/bisos/b/comment.py +94 -0
  22. bisos.b-0.2/bisos/b/cs/__init__.py +46 -0
  23. bisos.b-0.2/bisos/b/cs/arg.py +362 -0
  24. bisos.b-0.2/bisos/b/cs/cs.py +2096 -0
  25. bisos.b-0.2/bisos/b/cs/examples.py +644 -0
  26. bisos.b-0.2/bisos/b/cs/globalContext.py +305 -0
  27. bisos.b-0.2/bisos/b/cs/inCmnd.py +970 -0
  28. bisos.b-0.2/bisos/b/cs/k1-ro.py +1538 -0
  29. bisos.b-0.2/bisos/b/cs/main.py +269 -0
  30. bisos.b-0.2/bisos/b/cs/param.py +591 -0
  31. bisos.b-0.2/bisos/b/cs/ro.py +1554 -0
  32. bisos.b-0.2/bisos/b/cs/rpyc.py +186 -0
  33. bisos.b-0.2/bisos/b/cs/rtInvoker.py +267 -0
  34. bisos.b-0.2/bisos/b/cs/runArgs.py +281 -0
  35. bisos.b-0.2/bisos/b/cs/track.py +418 -0
  36. bisos.b-0.2/bisos/b/dir.py +203 -0
  37. bisos.b-0.2/bisos/b/exception.py +152 -0
  38. bisos.b-0.2/bisos/b/fp.py +1091 -0
  39. bisos.b-0.2/bisos/b/fpCls.py +1152 -0
  40. bisos.b-0.2/bisos/b/fpath.py +171 -0
  41. bisos.b-0.2/bisos/b/fto.py +255 -0
  42. bisos.b-0.2/bisos/b/fv.py +188 -0
  43. bisos.b-0.2/bisos/b/importFile.py +139 -0
  44. bisos.b-0.2/bisos/b/niche.py +205 -0
  45. bisos.b-0.2/bisos/b/op.py +394 -0
  46. bisos.b-0.2/bisos/b/pyRunAs.py +338 -0
  47. bisos.b-0.2/bisos/b/subProc.py +588 -0
  48. bisos.b-0.2/bisos/b/types.py +138 -0
  49. bisos.b-0.2/bisos.b.egg-info/PKG-INFO +64 -0
  50. bisos.b-0.2/bisos.b.egg-info/SOURCES.txt +56 -0
  51. bisos.b-0.2/bisos.b.egg-info/dependency_links.txt +1 -0
  52. bisos.b-0.2/bisos.b.egg-info/namespace_packages.txt +1 -0
  53. bisos.b-0.2/bisos.b.egg-info/not-zip-safe +1 -0
  54. bisos.b-0.2/bisos.b.egg-info/requires.txt +1 -0
  55. bisos.b-0.2/bisos.b.egg-info/top_level.txt +1 -0
  56. bisos.b-0.2/lh-agpl3-LICENSE.txt +679 -0
  57. bisos.b-0.2/setup.cfg +4 -0
  58. bisos.b-0.2/setup.py +75 -0
@@ -0,0 +1,6 @@
1
+ #
2
+
3
+ include lh-agpl3-LICENSE.txt
4
+
5
+ include TITLE.txt
6
+ include README.rst
bisos.b-0.2/PKG-INFO ADDED
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.1
2
+ Name: bisos.b
3
+ Version: 0.2
4
+ Summary: bisos.bx-bases: python scripts (Interactive Command Modules -- ICM) are used for bootstrapping the BISOS (ByStar Internet Services OS) environment.
5
+ Home-page: http://www.by-star.net/PLPC/180047
6
+ Download-URL: http://www.by-star.net/PLPC/180047
7
+ Author: Mohsen Banan
8
+ Author-email: libre@mohsen.1.banan.byname.net
9
+ Maintainer: Mohsen Banan
10
+ Maintainer-email: libre@mohsen.1.banan.byname.net
11
+ License: AGPL
12
+ Platform: UNKNOWN
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: GNU Affero General Public License v3
16
+ Classifier: Operating System :: POSIX
17
+ Classifier: Programming Language :: Python
18
+ Classifier: Topic :: Software Development :: Libraries
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+
21
+ =========
22
+ bisos.icm
23
+ =========
24
+
25
+ .. contents::
26
+ :depth: 3
27
+ ..
28
+
29
+ Overview
30
+ ========
31
+
32
+ BPF: BISOS Python Framework
33
+
34
+ Support
35
+ =======
36
+
37
+ | For support, criticism, comments and questions; please contact the
38
+ author/maintainer
39
+ | `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
40
+ http://mohsen.1.banan.byname.net/contact
41
+
42
+ Documentation
43
+ =============
44
+
45
+ Part of ByStar Digital Ecosystem http://www.by-star.net.
46
+
47
+ This module’s primary documentation is in
48
+ http://www.by-star.net/PLPC/180047
49
+
50
+ Installation
51
+ ============
52
+
53
+ ::
54
+
55
+ sudo pip install bisos.bpf
56
+
57
+ Usage
58
+ =====
59
+
60
+ ::
61
+
62
+ bin/pbfExampleIcm.py
63
+
64
+
bisos.b-0.2/README.rst ADDED
@@ -0,0 +1,42 @@
1
+ =========
2
+ bisos.icm
3
+ =========
4
+
5
+ .. contents::
6
+ :depth: 3
7
+ ..
8
+
9
+ Overview
10
+ ========
11
+
12
+ BPF: BISOS Python Framework
13
+
14
+ Support
15
+ =======
16
+
17
+ | For support, criticism, comments and questions; please contact the
18
+ author/maintainer
19
+ | `Mohsen Banan <http://mohsen.1.banan.byname.net>`__ at:
20
+ http://mohsen.1.banan.byname.net/contact
21
+
22
+ Documentation
23
+ =============
24
+
25
+ Part of ByStar Digital Ecosystem http://www.by-star.net.
26
+
27
+ This module’s primary documentation is in
28
+ http://www.by-star.net/PLPC/180047
29
+
30
+ Installation
31
+ ============
32
+
33
+ ::
34
+
35
+ sudo pip install bisos.bpf
36
+
37
+ Usage
38
+ =====
39
+
40
+ ::
41
+
42
+ bin/pbfExampleIcm.py
bisos.b-0.2/TITLE.txt ADDED
@@ -0,0 +1,2 @@
1
+ bisos.bx-bases: python scripts (Interactive Command Modules -- ICM) are used for bootstrapping the BISOS (ByStar Internet Services OS) environment.
2
+
@@ -0,0 +1,435 @@
1
+ #!/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ """\
4
+ * *[Summary]* :: A /library/ Beginning point for development of new ICM oriented libraries.
5
+ """
6
+
7
+ import typing
8
+
9
+ csInfo: typing.Dict[str, typing.Any] = { 'moduleDescription': ["""
10
+ * [[elisp:(org-show-subtree)][|=]] [[elisp:(org-cycle)][| *Description:* | ]]
11
+ ** [[elisp:(org-cycle)][| ]] [Xref] :: *[Related/Xrefs:]* <<Xref-Here->> -- External Documents [[elisp:(org-cycle)][| ]]
12
+
13
+ ** [[elisp:(org-cycle)][| ]] Model and Terminology :Overview:
14
+ *** concept -- Desctiption of concept
15
+ ** [End-Of-Description]
16
+ """], }
17
+
18
+ csInfo['moduleUsage'] = """
19
+ * [[elisp:(org-show-subtree)][|=]] [[elisp:(org-cycle)][| *Usage:* | ]]
20
+
21
+ ** How-Tos:
22
+ ** [End-Of-Usage]
23
+ """
24
+
25
+ csInfo['moduleStatus'] = """
26
+ * [[elisp:(org-show-subtree)][|=]] [[elisp:(org-cycle)][| *Status:* | ]]
27
+ ** [[elisp:(org-cycle)][| ]] [Info] :: *[Current-Info:]* Status/Maintenance -- General TODO List [[elisp:(org-cycle)][| ]]
28
+ ** TODO [[elisp:(org-cycle)][| ]] Current :: For now it is an ICM. Turn it into ICM-Lib. [[elisp:(org-cycle)][| ]]
29
+ ** [End-Of-Status]
30
+ """
31
+
32
+ """
33
+ * [[elisp:(org-cycle)][| *ICM-INFO:* |]] :: Author, Copyleft and Version Information
34
+ """
35
+ ####+BEGIN: bx:cs:py:name :style "fileName"
36
+ csInfo['moduleName'] = "csExamples"
37
+ ####+END:
38
+
39
+ ####+BEGIN: bx:cs:py:version-timestamp :style "date"
40
+ csInfo['version'] = "202209052608"
41
+ ####+END:
42
+
43
+ ####+BEGIN: bx:cs:py:status :status "Production"
44
+ csInfo['status'] = "Production"
45
+ ####+END:
46
+
47
+ csInfo['credits'] = ""
48
+
49
+ ####+BEGIN: bx:dblock:global:file-insert-cond :cond "./blee.el" :file "/bisos/apps/defaults/update/sw/icm/py/csInfo-mbNedaGplByStar.py"
50
+ csInfo['authors'] = "[[http://mohsen.1.banan.byname.net][Mohsen Banan]]"
51
+ csInfo['copyright'] = "Copyright 2017, [[http://www.neda.com][Neda Communications, Inc.]]"
52
+ csInfo['licenses'] = "[[https://www.gnu.org/licenses/agpl-3.0.en.html][Affero GPL]]", "Libre-Halaal Services License", "Neda Commercial License"
53
+ csInfo['maintainers'] = "[[http://mohsen.1.banan.byname.net][Mohsen Banan]]"
54
+ csInfo['contacts'] = "[[http://mohsen.1.banan.byname.net/contact]]"
55
+ csInfo['partOf'] = "[[http://www.by-star.net][Libre-Halaal ByStar Digital Ecosystem]]"
56
+ ####+END:
57
+
58
+ csInfo['panel'] = "{}-Panel.org".format(csInfo['moduleName'])
59
+ csInfo['groupingType'] = "IcmGroupingType-pkged"
60
+ csInfo['cmndParts'] = "IcmCmndParts[common] IcmCmndParts[param]"
61
+
62
+
63
+ ####+BEGIN: bx:cs:python:top-of-file :partof "bystar" :copyleft "halaal+minimal"
64
+ """ #+begin_org
65
+ * This file:/bisos/git/auth/bxRepos/bisos-pip/bpf/py3/bin/csExamples.cs :: [[elisp:(org-cycle)][| ]]
66
+ is part of The Libre-Halaal ByStar Digital Ecosystem. http://www.by-star.net
67
+ *CopyLeft* This Software is a Libre-Halaal Poly-Existential. See http://www.freeprotocols.org
68
+ A Python Interactively Command Module (PyICM).
69
+ Best Developed With COMEEGA-Emacs And Best Used With Blee-ICM-Players.
70
+ *WARNING*: All edits wityhin Dynamic Blocks may be lost.
71
+ #+end_org """
72
+ ####+END:
73
+
74
+ ####+BEGIN: bx:cs:python:topControls :partof "bystar" :copyleft "halaal+minimal"
75
+ """ #+begin_org
76
+ * [[elisp:(org-cycle)][|/Controls/| ]] :: [[elisp:(org-show-subtree)][|=]] [[elisp:(show-all)][Show-All]] [[elisp:(org-shifttab)][Overview]] [[elisp:(progn (org-shifttab) (org-content))][Content]] | [[file:Panel.org][Panel]] | [[elisp:(blee:ppmm:org-mode-toggle)][Nat]] | [[elisp:(bx:org:run-me)][Run]] | [[elisp:(bx:org:run-me-eml)][RunEml]] | [[elisp:(delete-other-windows)][(1)]] | [[elisp:(progn (save-buffer) (kill-buffer))][S&Q]] [[elisp:(save-buffer)][Save]] [[elisp:(kill-buffer)][Quit]] [[elisp:(org-cycle)][| ]]
77
+ ** /Version Control/ :: [[elisp:(call-interactively (quote cvs-update))][cvs-update]] [[elisp:(vc-update)][vc-update]] | [[elisp:(bx:org:agenda:this-file-otherWin)][Agenda-List]] [[elisp:(bx:org:todo:this-file-otherWin)][ToDo-List]]
78
+ #+end_org """
79
+ ####+END:
80
+ ####+BEGIN: bx:dblock:global:file-insert-cond :cond "./blee.el" :file "/bisos/apps/defaults/software/plusOrg/dblock/inserts/pyWorkBench.org"
81
+ """
82
+ * /Python Workbench/ :: [[elisp:(org-cycle)][| ]] [[elisp:(python-check (format "/bisos/venv/py3/bisos3/bin/python -m pyclbr %s" (bx:buf-fname))))][pyclbr]] || [[elisp:(python-check (format "/bisos/venv/py3/bisos3/bin/python -m pydoc ./%s" (bx:buf-fname))))][pydoc]] || [[elisp:(python-check (format "/bisos/pipx/bin/pyflakes %s" (bx:buf-fname)))][pyflakes]] | [[elisp:(python-check (format "/bisos/pipx/bin/pychecker %s" (bx:buf-fname))))][pychecker (executes)]] | [[elisp:(python-check (format "/bisos/pipx/bin/pycodestyle %s" (bx:buf-fname))))][pycodestyle]] | [[elisp:(python-check (format "/bisos/pipx/bin/flake8 %s" (bx:buf-fname))))][flake8]] | [[elisp:(python-check (format "/bisos/pipx/bin/pylint %s" (bx:buf-fname))))][pylint]] [[elisp:(org-cycle)][| ]]
83
+ """
84
+ ####+END:
85
+
86
+ ####+BEGIN: bx:cs:python:icmItem :itemType "=Imports=" :itemTitle "*IMPORTS*"
87
+ """ #+begin_org
88
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* =Imports= [[elisp:(outline-show-subtree+toggle)][||]] *IMPORTS* [[elisp:(org-cycle)][| ]]
89
+ #+end_org """
90
+ ####+END:
91
+
92
+
93
+ # import os
94
+ import collections
95
+
96
+ ####+BEGINNOT: bx:dblock:global:file-insert-cond :cond "./blee.el" :file "/bisos/apps/defaults/update/sw/icm/py/importUcfIcmBleepG.py"
97
+ from bisos import cs
98
+ from bisos import io
99
+ from bisos import bpf
100
+
101
+ #G = cs.globalContext.get()
102
+
103
+ from blee.icmPlayer import bleep
104
+ ####+END:
105
+
106
+ import collections
107
+
108
+ """ #+begin_org
109
+
110
+ #+BEGIN_SRC emacs-lisp
111
+ (setq b:py:cs:csuList
112
+ (list
113
+ "blee.icmPlayer.bleep"
114
+ "bisos.examples.pattern_csu"
115
+ "bisos.examples.pyRunAs_csu"
116
+ "bisos.examples.io_csu"
117
+ "bisos.examples.parsArgsStdinCmndResult_csu"
118
+ "bisos.examples.subProcOps_csu"
119
+ "bisos.examples.platformConfigs_csu"
120
+ ))
121
+ #+END_SRC
122
+
123
+ #+RESULTS:
124
+ | blee.icmPlayer.bleep | bisos.examples.pattern_csu | bisos.examples.pyRunAs_csu | bisos.examples.io_csu | bisos.examples.parsArgsStdinCmndResult_csu | bisos.examples.subProcOps_csu | bisos.examples.platformConfigs_csu |
125
+
126
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CsFrmWrk [[elisp:(outline-show-subtree+toggle)][||]] /csuList emacs-list Specifications/ [[elisp:(blee:org:code-block/above-run)][Eval Above:]] [[elisp:(org-cycle)][| ]]
127
+
128
+ #+end_org """
129
+
130
+
131
+ ####+BEGIN: b:py:cs:framework/csuListProc :pyImports t :csuImports t :csuParams t
132
+ """ #+begin_org
133
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CsFrmWrk [[elisp:(outline-show-subtree+toggle)][||]] ~Process CSU List~ with 7 in csuList pyImports=t csuImports=t csuParams=t
134
+ #+end_org """
135
+
136
+ from blee.icmPlayer import bleep
137
+ from bisos.examples import pattern_csu
138
+ from bisos.examples import pyRunAs_csu
139
+ from bisos.examples import io_csu
140
+ from bisos.examples import parsArgsStdinCmndResult_csu
141
+ from bisos.examples import subProcOps_csu
142
+ from bisos.examples import platformConfigs_csu
143
+
144
+
145
+ csuList = [ 'blee.icmPlayer.bleep', 'bisos.examples.pattern_csu', 'bisos.examples.pyRunAs_csu', 'bisos.examples.io_csu', 'bisos.examples.parsArgsStdinCmndResult_csu', 'bisos.examples.subProcOps_csu', 'bisos.examples.platformConfigs_csu', ]
146
+
147
+ g_importedCmndsModules = cs.csuList_importedModules(csuList)
148
+
149
+ def g_extraParams():
150
+ csParams = cs.param.CmndParamDict()
151
+ cs.csuList_commonParamsSpecify(csuList, csParams)
152
+ cs.argsparseBasedOnCsParams(csParams)
153
+
154
+ ####+END:
155
+
156
+ ####+BEGINNOT: b:py3:cs:cmnd/classHead :cmndName "examples" :comment "FrameWrk: ICM Examples" :parsMand "" :parsOpt "" :argsMin 0 :argsMax 0 :pyInv ""
157
+ """ #+begin_org
158
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CmndSvc [[elisp:(outline-show-subtree+toggle)][||]] <<example>> =FrameWrk: ICM Examples= parsMand= parsOpt= argsMin=0 argsMax=0 asFunc= interactive= [[elisp:(org-cycle)][| ]]
159
+ #+end_org """
160
+ class examples(cs.Cmnd):
161
+ cmndParamsMandatory = [ ]
162
+ cmndParamsOptional = [ ]
163
+ cmndArgsLen = {'Min': 0, 'Max': 0,}
164
+
165
+ @io.track.subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True)
166
+ def cmnd(self,
167
+ rtInv: cs.RtInvoker,
168
+ cmndOutcome: bpf.op.Outcome,
169
+ ) -> bpf.op.Outcome:
170
+ cmndOutcome = self.getOpOutcome()
171
+ if rtInv.outs:
172
+ if not self.cmndLineValidate(outcome=cmndOutcome):
173
+ return cmndOutcome
174
+
175
+ callParamsDict = {}
176
+ if not cs.cmndCallParamsValidate(callParamsDict, rtInv, outcome=cmndOutcome):
177
+ return cmndOutcome
178
+
179
+ """FrameWrk: ICM Examples"""
180
+ ####+END:
181
+ def cpsInit(): return collections.OrderedDict()
182
+ def menuItem(verbosity): cs.examples.cmndInsert(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none'
183
+ #def execLineEx(cmndStr): cs.examples.execInsert(execLine=cmndStr)
184
+
185
+ #logControler = io.log.Control()
186
+ #logControler.loggerSetLevel(20)
187
+
188
+ cs.examples.myName(cs.G.icmMyName(), cs.G.icmMyFullName())
189
+
190
+ cs.examples.commonBrief()
191
+
192
+ bleep.examples_icmBasic()
193
+
194
+ cs.examples.menuChapter('=Misc= *Facilities*')
195
+
196
+ cmndName = "dirCreateExamples" ; cmndArgs = "" ;
197
+ cps=cpsInit() ;
198
+ menuItem(verbosity='little')
199
+
200
+ cmndName = "exceptionExamples" ; menuItem(verbosity='little')
201
+
202
+ cmndName = "subProcOpsExamples" ; menuItem(verbosity='little')
203
+
204
+ pattern_csu.examples_csu(sectionTitle="default")
205
+
206
+ pyRunAs_csu.examples_csu(sectionTitle="default")
207
+
208
+ io_csu.examples_csu(sectionTitle="default")
209
+
210
+ parsArgsStdinCmndResult_csu.examples_csu(sectionTitle="default")
211
+
212
+ subProcOps_csu.examples_csu(sectionTitle="default")
213
+
214
+ platformConfigs_csu.examples_csu(sectionTitle="default")
215
+
216
+ cs.examples.menuChapter('=Tests= *All Examples As Tests*')
217
+ cmndName = "allExamplesAsTests" ; menuItem(verbosity='none')
218
+
219
+ return(cmndOutcome)
220
+
221
+
222
+
223
+ ####+BEGIN: b:py3:cs:cmnd/classHead :cmndName "examplesOld" :comment "FrameWrk: ICM Examples" :parsMand "" :parsOpt "" :argsMin 0 :argsMax 0 :pyInv ""
224
+ """ #+begin_org
225
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CmndSvc- [[elisp:(outline-show-subtree+toggle)][||]] <<examplesOld>> =FrameWrk: ICM Examples=parsMand= parsOpt= argsMin=0 argsMax=0 pyInv=
226
+ #+end_org """
227
+ class examplesOld(cs.Cmnd):
228
+ cmndParamsMandatory = [ ]
229
+ cmndParamsOptional = [ ]
230
+ cmndArgsLen = {'Min': 0, 'Max': 0,}
231
+
232
+ @io.track.subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True)
233
+ def cmnd(self,
234
+ rtInv: cs.RtInvoker,
235
+ cmndOutcome: bpf.op.Outcome,
236
+ ) -> bpf.op.Outcome:
237
+ """FrameWrk: ICM Examples"""
238
+ callParamsDict = {}
239
+ if self.invocationValidate(rtInv, cmndOutcome, callParamsDict, None).isProblematic():
240
+ return io.eh.badOutcome(cmndOutcome)
241
+ ####+END:
242
+ def cpsInit(): return collections.OrderedDict()
243
+ def menuItem(verbosity): cs.examples.cmndInsert(cmndName, cps, cmndArgs, verbosity=verbosity) # 'little' or 'none'
244
+ #def execLineEx(cmndStr): cs.examples.execInsert(execLine=cmndStr)
245
+
246
+ #logControler = io.log.Control()
247
+ #logControler.loggerSetLevel(20)
248
+
249
+ cs.examples.myName(cs.G.icmMyName(), cs.G.icmMyFullName())
250
+
251
+ cs.examples.commonBrief()
252
+
253
+ bleep.examples_icmBasic()
254
+
255
+
256
+ cs.examples.menuChapter('=Misc= *Facilities*')
257
+
258
+ cmndName = "dirCreateExamples" ; cmndArgs = "" ;
259
+ cps=cpsInit() ;
260
+ menuItem(verbosity='little')
261
+
262
+ cmndName = "exceptionExamples" ; menuItem(verbosity='little')
263
+
264
+ cmndName = "subProcOpsExamples" ; menuItem(verbosity='little')
265
+
266
+ pattern_csu.examples_csu(sectionTitle="default")
267
+
268
+ pyRunAs_csu.examples_csu(sectionTitle="default")
269
+
270
+ io_csu.examples_csu(sectionTitle="default")
271
+
272
+ parsArgsStdinCmndResult_csu.examples_csu(sectionTitle="default")
273
+
274
+ subProcOps_csu.examples_csu(sectionTitle="default")
275
+
276
+ platformConfigs_csu.examples_csu(sectionTitle="default")
277
+
278
+ cs.examples.menuChapter('=Tests= *All Examples As Tests*')
279
+ cmndName = "allExamplesAsTests" ; menuItem(verbosity='none')
280
+
281
+ return(cmndOutcome)
282
+
283
+
284
+ ####+BEGIN: b:py3:cs:cmnd/classHead :cmndName "dirCreateExamples" :comment "" :parsMand "" :parsOpt "" :argsMin 0 :argsMax 0 :pyInv ""
285
+ """ #+begin_org
286
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CmndSvc- [[elisp:(outline-show-subtree+toggle)][||]] <<dirCreateExamples>>parsMand= parsOpt= argsMin=0 argsMax=0 pyInv=
287
+ #+end_org """
288
+ class dirCreateExamples(cs.Cmnd):
289
+ cmndParamsMandatory = [ ]
290
+ cmndParamsOptional = [ ]
291
+ cmndArgsLen = {'Min': 0, 'Max': 0,}
292
+
293
+ @io.track.subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True)
294
+ def cmnd(self,
295
+ rtInv: cs.RtInvoker,
296
+ cmndOutcome: bpf.op.Outcome,
297
+ ) -> bpf.op.Outcome:
298
+
299
+ callParamsDict = {}
300
+ if self.invocationValidate(rtInv, cmndOutcome, callParamsDict, None).isProblematic():
301
+ return io.eh.badOutcome(cmndOutcome)
302
+ ####+END:
303
+ docStr = """
304
+ ***** [[elisp:(org-cycle)][| *CmndDesc:* | ]] Various examples for creation of directories.
305
+ - examples and smoke unit test for file: ../bisos/bpf/dir.py
306
+ """
307
+ if self.docStrClassSet(docStr,): return cmndOutcome
308
+
309
+ bpf.dir.createIfNotThere("/tmp/t1")
310
+
311
+ return cmndOutcome
312
+
313
+
314
+
315
+ ####+BEGIN: b:py3:cs:cmnd/classHead :cmndName "exceptionExamples" :comment "" :parsMand "" :parsOpt "" :argsMin 0 :argsMax 0 :pyInv ""
316
+ """ #+begin_org
317
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CmndSvc- [[elisp:(outline-show-subtree+toggle)][||]] <<exceptionExamples>>parsMand= parsOpt= argsMin=0 argsMax=0 pyInv=
318
+ #+end_org """
319
+ class exceptionExamples(cs.Cmnd):
320
+ cmndParamsMandatory = [ ]
321
+ cmndParamsOptional = [ ]
322
+ cmndArgsLen = {'Min': 0, 'Max': 0,}
323
+
324
+ @io.track.subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True)
325
+ def cmnd(self,
326
+ rtInv: cs.RtInvoker,
327
+ cmndOutcome: bpf.op.Outcome,
328
+ ) -> bpf.op.Outcome:
329
+
330
+ callParamsDict = {}
331
+ if self.invocationValidate(rtInv, cmndOutcome, callParamsDict, None).isProblematic():
332
+ return io.eh.badOutcome(cmndOutcome)
333
+ ####+END:
334
+
335
+ bpf.exception.terminate("PREV-Term", "NEXT-Term", "Some Termination Message")
336
+
337
+ # terminate, terminates. So, below is unreachable.
338
+ #
339
+
340
+ try:
341
+ raise bpf.exception.TransitionError("PREV", "NEXT", "Some Message")
342
+ except bpf.exception.TransitionError as inst:
343
+ print(inst)
344
+
345
+ return cmndOutcome
346
+
347
+
348
+
349
+ ####+BEGIN: b:py3:cs:cmnd/classHead :cmndName "allExamplesAsTests" :comment "" :parsMand "" :parsOpt "" :argsMin 0 :argsMax 0 :pyInv ""
350
+ """ #+begin_org
351
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CmndSvc- [[elisp:(outline-show-subtree+toggle)][||]] <<allExamplesAsTests>>parsMand= parsOpt= argsMin=0 argsMax=0 pyInv=
352
+ #+end_org """
353
+ class allExamplesAsTests(cs.Cmnd):
354
+ cmndParamsMandatory = [ ]
355
+ cmndParamsOptional = [ ]
356
+ cmndArgsLen = {'Min': 0, 'Max': 0,}
357
+
358
+ @io.track.subjectToTracking(fnLoc=True, fnEntry=True, fnExit=True)
359
+ def cmnd(self,
360
+ rtInv: cs.RtInvoker,
361
+ cmndOutcome: bpf.op.Outcome,
362
+ ) -> bpf.op.Outcome:
363
+
364
+ callParamsDict = {}
365
+ if self.invocationValidate(rtInv, cmndOutcome, callParamsDict, None).isProblematic():
366
+ return io.eh.badOutcome(cmndOutcome)
367
+ ####+END:
368
+ self.cmndDocStr(f""" #+begin_org \
369
+ ** [[elisp:(org-cycle)][| *CmndDesc:* | ]] This is an example of a CmndSvc with lots of features.
370
+ #+end_org """)
371
+
372
+ myName = cs.G.icmMyName()
373
+
374
+ verbosity = " -v 20 "
375
+
376
+ if bpf.subProc.WOpW(invedBy=self, log=1).bash(
377
+ f"""{myName} {verbosity} -i sameInstanceEx""",
378
+ ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
379
+
380
+ if bpf.subProc.WOpW(invedBy=self, log=1).bash(
381
+ f"""{myName} {verbosity} -i runAsUser""",
382
+ ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
383
+
384
+ if bpf.subProc.WOpW(invedBy=self, log=1).bash(
385
+ f"""{myName} {verbosity} -i outStreamsExamples""",
386
+ ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
387
+
388
+ # if bpf.subProc.WOpW(invedBy=self, log=1).bash(
389
+ # f"""{myName} {verbosity} -i subProcOpsWithArgs echo this and that""",
390
+ # ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
391
+
392
+ if bpf.subProc.WOpW(invedBy=self, log=1).bash(
393
+ f"""{myName} {verbosity} --par1Example="par1Mantory" --par2Example="par2Optional" -i parsArgsStdinCmndResult""",
394
+ ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
395
+
396
+ if bpf.subProc.WOpW(invedBy=self, log=1).bash(
397
+ f"""{myName} {verbosity} -i pyCmndInvOf_parsArgsStdinCmndResult""",
398
+ ).isProblematic(): return(io.eh.badOutcome(cmndOutcome))
399
+
400
+ return cmndOutcome
401
+
402
+
403
+ ####+BEGIN: b:py3:cs:framework/main :csInfo "csInfo" :noCmndEntry "examples" :extraParamsHook "g_extraParams" :importedCmndsModules "g_importedCmndsModules"
404
+ """ #+begin_org
405
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* CsFrmWrk [[elisp:(outline-show-subtree+toggle)][||]] ~g_icmMain~ (csInfo, _examples_, g_extraParams, g_importedCmndsModules)
406
+ #+end_org """
407
+
408
+ if __name__ == '__main__':
409
+ cs.main.g_csMain(
410
+ csInfo=csInfo,
411
+ noCmndEntry=examples, # specify a Cmnd name
412
+ extraParamsHook=g_extraParams,
413
+ importedCmndsModules=g_importedCmndsModules,
414
+ )
415
+
416
+ ####+END:
417
+
418
+ ####+BEGIN: blee:bxPanel:foldingSection :outLevel 0 :title " ~End Of Editable Text~ "
419
+ """ #+begin_org
420
+ * _[[elisp:(blee:menu-sel:outline:popupMenu)][±]]_ _[[elisp:(blee:menu-sel:navigation:popupMenu)][Ξ]]_ [[elisp:(outline-show-branches+toggle)][|=]] [[elisp:(bx:orgm:indirectBufOther)][|>]] *[[elisp:(blee:ppmm:org-mode-toggle)][|N]]* [[elisp:(outline-show-subtree+toggle)][| _ ~End Of Editable Text~ _: |]] [[elisp:(org-shifttab)][<)]] E|
421
+ #+end_org """
422
+ ####+END:
423
+
424
+ ####+BEGIN: bx:dblock:global:file-insert-cond :cond "./blee.el" :file "/bisos/apps/defaults/software/plusOrg/dblock/inserts/endOfFileControls.org"
425
+ #+STARTUP: showall
426
+ ####+END:
427
+
428
+ ####+BEGIN: b:prog:file/endOfFile :extraParams nil
429
+ """ #+begin_org
430
+ * *[[elisp:(org-cycle)][| END-OF-FILE |]]* :: emacs and org variables and control parameters
431
+ #+end_org """
432
+ ### local variables:
433
+ ### no-byte-compile: t
434
+ ### end:
435
+ ####+END:
@@ -0,0 +1 @@
1
+ __import__('pkg_resources').declare_namespace(__name__)
@@ -0,0 +1,77 @@
1
+ # BPF Package (bisos.b) -- BISOS Python Framework
2
+ #
3
+ # Order of inclusion is important. The order reflects laying and design.
4
+
5
+ Void = type('Void', (), dict(__repr__=lambda self: 'Void'))()
6
+ Vague = type('Vague', (), dict(__repr__=lambda self: 'Vague'))()
7
+
8
+ # ============ Layer 1 (BCF) =============
9
+ #
10
+ # BCF layer is: BPF Common Facilities (these have no BPF imports and provide common facilities)
11
+ #
12
+
13
+ # __import__('pkg_resources').declare_namespace(__name__)
14
+
15
+ # This has to come late or before .types because types collides with b.types
16
+ from .importFile import *
17
+
18
+ #from bisos.b import types # expose ./types.py as b.types.
19
+ from .types import * # expose ./types.py as b.types.
20
+
21
+ from .comment import (orgMode,)
22
+
23
+
24
+ # WHY import * fails here?
25
+ from bisos.b import ast # expose ./ast.py as b.ast. -- from .ast import *, Does not work
26
+
27
+ # ============ Layer 2 Exposed CmndSvc Facilities (Cmnd) =============
28
+ #
29
+ # ExposedCS Facilities -- cs.Cmnd, @cs.track
30
+ #
31
+ # b.fv, b.fto, b.fp and b.cs.* and b.io.* are intertwined.
32
+ #
33
+
34
+
35
+
36
+ from .op import *
37
+
38
+ #from bisos.b import cs # This is necessary here to bring over everything else
39
+ #from bisos.b.cs import inCmnd
40
+ from .cs import *
41
+
42
+ # B.IO
43
+ #from bisos.b import io
44
+ #from .io import *
45
+ from .b_io import *
46
+
47
+ from .dir import *
48
+
49
+ from .exception import *
50
+
51
+ #
52
+ # b.fv, b.fto, b.fp and b.cs.* and b.io.* are intertwined.
53
+
54
+ from .fv import *
55
+
56
+ from .fto import *
57
+
58
+ #from bisos.b import fp
59
+ from .fp import *
60
+
61
+ # ============ Layer 3 CS Common Usage Facilities =============
62
+ #
63
+ # CsCommonUsage Facilities -- subProc, RunAs, niching, BuiltIn Commands
64
+ #
65
+
66
+ from .fpCls import *
67
+
68
+ from bisos.b.cs import ro
69
+
70
+ from .subProc import *
71
+
72
+ from .pyRunAs import *
73
+
74
+ from .niche import *
75
+
76
+ from .fpath import *
77
+