lyrpy 0.0.2__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.
- lyr/LUConsole.py +402 -0
- lyr/LUConst.py +45 -0
- lyr/LUDateTime.py +207 -0
- lyr/LUDecotators.py +418 -0
- lyr/LUDict.py +117 -0
- lyr/LUDoc.py +61 -0
- lyr/LUErrors.py +80 -0
- lyr/LUFile.py +1174 -0
- lyr/LUFileUtils.py +486 -0
- lyr/LULog.py +2249 -0
- lyr/LUNetwork.py +277 -0
- lyr/LUNumUtils.py +305 -0
- lyr/LUObjects.py +208 -0
- lyr/LUObjectsYT.py +829 -0
- lyr/LUParserARG.py +365 -0
- lyr/LUParserINI.py +371 -0
- lyr/LUParserREG.py +510 -0
- lyr/LUProc.py +110 -0
- lyr/LUQThread.py +139 -0
- lyr/LUQTimer.py +197 -0
- lyr/LUSheduler.py +940 -0
- lyr/LUStrDecode.py +223 -0
- lyr/LUStrUtils.py +633 -0
- lyr/LUSupport.py +124 -0
- lyr/LUThread.py +176 -0
- lyr/LUTimer.py +139 -0
- lyr/LUVersion.py +380 -0
- lyr/LUYouTube.py +204 -0
- lyr/LUos.py +797 -0
- lyr/LUsys.py +47 -0
- lyr/__init__.py +21 -0
- lyr/__main__.py +19 -0
- lyrpy-0.0.2.dist-info/LICENSE +19 -0
- lyrpy-0.0.2.dist-info/METADATA +19 -0
- lyrpy-0.0.2.dist-info/RECORD +37 -0
- lyrpy-0.0.2.dist-info/WHEEL +5 -0
- lyrpy-0.0.2.dist-info/top_level.txt +1 -0
lyr/LUObjects.py
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"""LUObjects.py"""
|
|
2
|
+
# -*- coding: UTF-8 -*-
|
|
3
|
+
__annotations__ = """
|
|
4
|
+
=======================================================
|
|
5
|
+
Copyright (c) 2023-2024
|
|
6
|
+
Author:
|
|
7
|
+
Lisitsin Y.R.
|
|
8
|
+
Project:
|
|
9
|
+
LU_PY
|
|
10
|
+
Python (LU)
|
|
11
|
+
Module:
|
|
12
|
+
LUObjects.py
|
|
13
|
+
|
|
14
|
+
=======================================================
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
#------------------------------------------
|
|
18
|
+
# БИБЛИОТЕКИ python
|
|
19
|
+
#------------------------------------------
|
|
20
|
+
import logging
|
|
21
|
+
import enum
|
|
22
|
+
|
|
23
|
+
#------------------------------------------
|
|
24
|
+
# БИБЛИОТЕКИ сторонние
|
|
25
|
+
#------------------------------------------
|
|
26
|
+
|
|
27
|
+
#------------------------------------------
|
|
28
|
+
# БИБЛИОТЕКИ LU
|
|
29
|
+
#------------------------------------------
|
|
30
|
+
import lyr.LULog as LULog
|
|
31
|
+
|
|
32
|
+
# ===========================================================================
|
|
33
|
+
# type
|
|
34
|
+
# otUsers, otTask, otTasks, otDirectory, otEMail, otFile, otMonth, otUser
|
|
35
|
+
# ===========================================================================
|
|
36
|
+
# class syntax
|
|
37
|
+
@enum.unique
|
|
38
|
+
class TObjectTypeClass(enum.Enum):
|
|
39
|
+
"""TObjectTypeClass"""
|
|
40
|
+
otNone = 0
|
|
41
|
+
otYouTubeObject = 1
|
|
42
|
+
@classmethod
|
|
43
|
+
def Empty(cls):
|
|
44
|
+
...
|
|
45
|
+
#endclass
|
|
46
|
+
|
|
47
|
+
class TObjects (object):
|
|
48
|
+
"""TObjects"""
|
|
49
|
+
luClassName = "TObjects"
|
|
50
|
+
|
|
51
|
+
#--------------------------------------------------
|
|
52
|
+
# constructor
|
|
53
|
+
#--------------------------------------------------
|
|
54
|
+
def __init__(self):
|
|
55
|
+
""" Constructor """
|
|
56
|
+
#beginfunction
|
|
57
|
+
super().__init__()
|
|
58
|
+
self.__FTag: int = 0
|
|
59
|
+
self.__FObjectType: TObjectTypeClass = TObjectTypeClass.otNone
|
|
60
|
+
self.Clear()
|
|
61
|
+
#endfunction
|
|
62
|
+
|
|
63
|
+
#--------------------------------------------------
|
|
64
|
+
# destructor
|
|
65
|
+
#--------------------------------------------------
|
|
66
|
+
def __del__(self):
|
|
67
|
+
""" destructor """
|
|
68
|
+
#beginfunction
|
|
69
|
+
LClassName = self.__class__.__name__
|
|
70
|
+
s = '{} уничтожен'.format (LClassName)
|
|
71
|
+
# LULog.LoggerTOOLS_AddLevel (LULog.DEBUGTEXT, s)
|
|
72
|
+
#print (s)
|
|
73
|
+
#endfunction
|
|
74
|
+
|
|
75
|
+
def Clear(self):
|
|
76
|
+
#beginfunction
|
|
77
|
+
self.Tag = 0
|
|
78
|
+
self.ObjectType = TObjectTypeClass.otNone
|
|
79
|
+
#endfunction
|
|
80
|
+
|
|
81
|
+
#--------------------------------------------------
|
|
82
|
+
# @property Tag
|
|
83
|
+
#--------------------------------------------------
|
|
84
|
+
# getter
|
|
85
|
+
@property
|
|
86
|
+
def Tag(self) -> int:
|
|
87
|
+
#beginfunction
|
|
88
|
+
return self.__FTag
|
|
89
|
+
#endfunction
|
|
90
|
+
@Tag.setter
|
|
91
|
+
def Tag(self, Value: int):
|
|
92
|
+
#beginfunction
|
|
93
|
+
self.__FTag = Value
|
|
94
|
+
#endfunction
|
|
95
|
+
|
|
96
|
+
#--------------------------------------------------
|
|
97
|
+
# @property ObjectType
|
|
98
|
+
#--------------------------------------------------
|
|
99
|
+
# getter
|
|
100
|
+
@property
|
|
101
|
+
def ObjectType(self) -> TObjectTypeClass:
|
|
102
|
+
#beginfunction
|
|
103
|
+
return self.__FObjectType
|
|
104
|
+
#endfunction
|
|
105
|
+
@ObjectType.setter
|
|
106
|
+
def ObjectType(self, Value: TObjectTypeClass):
|
|
107
|
+
#beginfunction
|
|
108
|
+
self.__FObjectType = Value
|
|
109
|
+
#endfunction
|
|
110
|
+
|
|
111
|
+
# --------------------------------------------
|
|
112
|
+
# TObjectsItem
|
|
113
|
+
# --------------------------------------------
|
|
114
|
+
class TObjectsItem (object):
|
|
115
|
+
"""TObjectsItem"""
|
|
116
|
+
luClassName = "TObjectsItem"
|
|
117
|
+
|
|
118
|
+
#--------------------------------------------------
|
|
119
|
+
# constructor
|
|
120
|
+
#--------------------------------------------------
|
|
121
|
+
def __init__(self):
|
|
122
|
+
""" Constructor """
|
|
123
|
+
super().__init__()
|
|
124
|
+
self.__FObjects: TObjects = TObjects ()
|
|
125
|
+
|
|
126
|
+
#--------------------------------------------------
|
|
127
|
+
# destructor
|
|
128
|
+
#--------------------------------------------------
|
|
129
|
+
def __del__(self):
|
|
130
|
+
""" destructor """
|
|
131
|
+
# удалить объект
|
|
132
|
+
del self.__FObjects
|
|
133
|
+
LClassName = self.__class__.__name__
|
|
134
|
+
s = '{} уничтожен'.format (LClassName)
|
|
135
|
+
# LULog.LoggerTOOLS_AddLevel (LULog.DEBUGTEXT, s)
|
|
136
|
+
|
|
137
|
+
#--------------------------------------------------
|
|
138
|
+
# @property Objects
|
|
139
|
+
#--------------------------------------------------
|
|
140
|
+
# getter
|
|
141
|
+
@property
|
|
142
|
+
def Objects(self):
|
|
143
|
+
#beginfunction
|
|
144
|
+
return self.__FObjects
|
|
145
|
+
#endfunction
|
|
146
|
+
@Objects.setter
|
|
147
|
+
def Objects(self, Value: TObjects):
|
|
148
|
+
#beginfunction
|
|
149
|
+
self.__FObjects: TObjects = Value
|
|
150
|
+
#endfunction
|
|
151
|
+
#endclass
|
|
152
|
+
|
|
153
|
+
# --------------------------------------------
|
|
154
|
+
# TObjectsCollection
|
|
155
|
+
# --------------------------------------------
|
|
156
|
+
class TObjectsCollection (list):
|
|
157
|
+
"""TObjectsCollection"""
|
|
158
|
+
luClassName = "TObjectsCollection"
|
|
159
|
+
|
|
160
|
+
#--------------------------------------------------
|
|
161
|
+
# constructor
|
|
162
|
+
#--------------------------------------------------
|
|
163
|
+
def __init__ (self):
|
|
164
|
+
""" Constructor """
|
|
165
|
+
super ().__init__ ()
|
|
166
|
+
|
|
167
|
+
#--------------------------------------------------
|
|
168
|
+
# destructor
|
|
169
|
+
#--------------------------------------------------
|
|
170
|
+
def __del__(self):
|
|
171
|
+
""" destructor """
|
|
172
|
+
self.clear() # удалить все items
|
|
173
|
+
LClassName = self.__class__.__name__
|
|
174
|
+
s = '{} уничтожен'.format (LClassName)
|
|
175
|
+
# LULog.LoggerTOOLS_AddLevel (LULog.DEBUGTEXT, s)
|
|
176
|
+
|
|
177
|
+
def AddItem(self) -> TObjectsItem:
|
|
178
|
+
LObjectsItem: TObjectsItem = TObjectsItem()
|
|
179
|
+
self.append (LObjectsItem)
|
|
180
|
+
return self[self.__len__()-1]
|
|
181
|
+
|
|
182
|
+
def GetItem(self, Index: int) -> TObjectsItem:
|
|
183
|
+
#beginfunction
|
|
184
|
+
LResult: TObjectsItem = self[Index]
|
|
185
|
+
return LResult
|
|
186
|
+
#endfunction
|
|
187
|
+
|
|
188
|
+
def SetItem(self, Index: int, Value: TObjectsItem):
|
|
189
|
+
#beginfunction
|
|
190
|
+
self[Index] = Value
|
|
191
|
+
#endfunction
|
|
192
|
+
#endclass
|
|
193
|
+
|
|
194
|
+
#------------------------------------------
|
|
195
|
+
def main ():
|
|
196
|
+
#beginfunction
|
|
197
|
+
print('main LUObjects.py...')
|
|
198
|
+
#endfunction
|
|
199
|
+
|
|
200
|
+
#------------------------------------------
|
|
201
|
+
#
|
|
202
|
+
#------------------------------------------
|
|
203
|
+
#beginmodule
|
|
204
|
+
if __name__ == "__main__":
|
|
205
|
+
main()
|
|
206
|
+
#endif
|
|
207
|
+
|
|
208
|
+
#endmodule
|