Skip to content

Commit 233c111

Browse files
authored
Merge pull request #49 from hANSIc99/dev
v1.7 ready
2 parents ae8643d + 864bc57 commit 233c111

18 files changed

+2059
-17
lines changed

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.7
2+
3+
Added SetPersist type
4+
Modified Telegram element to use SetPersist type
5+
16
1.6
27

38
Websocket can now connect to any host

Containerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#Type CIName Version License
1818
# Pythonic
1919
# INCLUDED PACKAGES
20-
# IMG Fedora 33 GPL
20+
# IMG Fedora 31 GPL
2121
# BIN Supervisor 3.2.0 Custom license
2222
# BIN ms-python 2020.10.332292344
2323
#
@@ -77,11 +77,11 @@ RUN /usr/bin/python3 -m pip install pylint==2.7.4
7777
###################################
7878

7979

80-
COPY dist/Pythonic-1.6.tar.gz /
80+
COPY dist/Pythonic-1.7.tar.gz /
8181

82-
RUN /usr/bin/python3 -m pip install /Pythonic-1.6.tar.gz
82+
RUN /usr/bin/python3 -m pip install /Pythonic-1.7.tar.gz
8383

84-
RUN rm Pythonic-1.6.tar.gz
84+
RUN rm Pythonic-1.7.tar.gz
8585

8686
###################################
8787
# #

TODOS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
General:
2+
23
Check if the 'inline'-keyword can be applied to some loops
34
(page 146 C++ Der Programmierer)
45

6+
Use dispatch tables instead of switch-case / if elif pattern
7+
58
Elementeditor:
69
Add the possibility to pass arbitrary number of keyword arguments or
710
to build a dictionary from within the editor
11+
12+

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ python3 setup.py sdist
1818
#src/code-server/download.sh
1919

2020
# BUILD CONTAINER IMAGE
21-
#podman build -t pythonicautomation/pythonic:1.6 .
21+
#podman build -t pythonicautomation/pythonic:1.7 .

dist/Pythonic-1.7.tar.gz

5.15 MB
Binary file not shown.

dist/PythonicRPI-1.7.tar.gz

5.14 MB
Binary file not shown.
Lines changed: 292 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,292 @@
1+
[
2+
{
3+
"AllowStream": true,
4+
"AreaNo": 0,
5+
"Author": "Stephan Avenwedde",
6+
"Childs": [],
7+
"Config": {
8+
"GeneralConfig": {
9+
"Autostart": false,
10+
"Debug": false,
11+
"Logging": true,
12+
"MP": false
13+
},
14+
"SpecificConfig": [
15+
{
16+
"Data": "",
17+
"Name": "Token",
18+
"Type": "LineEdit"
19+
}
20+
]
21+
},
22+
"ConstructorCMD_Unix": "cp -u executables/telegram.py ~/Pythonic/executables/telegram_BASICDATA_Id.py",
23+
"ConstructorCMD_Win32": "copy executables\\telegram.py %HOMEPATH%\\Pythonic\\executables\\telegram_BASICDATA_Id.py",
24+
"DestructorCMD_Unix": "rm ~/Pythonic/executables/telegram_BASICDATA_Id.py",
25+
"DestructorCMD_Win32": "del %HOMEPATH%\\Pythonic\\executables\\telegram_BASICDATA_Id.py",
26+
"Filename": "telegram_2ca7cd73",
27+
"HighlightState": true,
28+
"Iconname": "Telegram",
29+
"Id": 749194611,
30+
"License": "GPLv3",
31+
"ObjectName": "Telegram - 0x2ca7cd73",
32+
"Parents": [
33+
911702588,
34+
139702420,
35+
1602299381
36+
],
37+
"Plug": true,
38+
"Position": {
39+
"x": 619,
40+
"y": 237
41+
},
42+
"PythonicVersion": {
43+
"Major": 1,
44+
"Minor": 3
45+
},
46+
"Socket": true,
47+
"Typename": "Telegram",
48+
"Version": {
49+
"Major": 0,
50+
"Minor": 1
51+
}
52+
},
53+
{
54+
"AllowStream": true,
55+
"AreaNo": 0,
56+
"Author": "Stephan Avenwedde",
57+
"Childs": [
58+
749194611
59+
],
60+
"Config": {
61+
"GeneralConfig": {
62+
"Autostart": true,
63+
"Debug": false,
64+
"Logging": false,
65+
"MP": false
66+
},
67+
"SpecificConfig": [
68+
{
69+
"Data": "Single fire",
70+
"Index": 0,
71+
"Name": "Mode",
72+
"Type": "ComboBox"
73+
},
74+
{
75+
"Data": "Seconds",
76+
"Index": 0,
77+
"Name": "Timebase",
78+
"Type": "ComboBox"
79+
},
80+
{
81+
"Data": "5",
82+
"Name": "Intervalinput",
83+
"Type": "LineEdit"
84+
},
85+
{
86+
"Data": "10:00",
87+
"Name": "StartTime",
88+
"Type": "LineEdit"
89+
},
90+
{
91+
"Data": "13:00",
92+
"Name": "EndTime",
93+
"Type": "LineEdit"
94+
},
95+
{
96+
"Data": "13:00",
97+
"Name": "SpecificTime",
98+
"Type": "LineEdit"
99+
},
100+
{
101+
"Data": false,
102+
"Name": "Monday",
103+
"Type": "CheckBox"
104+
},
105+
{
106+
"Data": false,
107+
"Name": "Tuesday",
108+
"Type": "CheckBox"
109+
},
110+
{
111+
"Data": false,
112+
"Name": "Wednesday",
113+
"Type": "CheckBox"
114+
},
115+
{
116+
"Data": false,
117+
"Name": "Thursday",
118+
"Type": "CheckBox"
119+
},
120+
{
121+
"Data": false,
122+
"Name": "Friday",
123+
"Type": "CheckBox"
124+
},
125+
{
126+
"Data": false,
127+
"Name": "Saturday",
128+
"Type": "CheckBox"
129+
},
130+
{
131+
"Data": false,
132+
"Name": "Sunday",
133+
"Type": "CheckBox"
134+
}
135+
]
136+
},
137+
"ConstructorCMD_Unix": "cp -u executables/manual_scheduler.py ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
138+
"ConstructorCMD_Win32": "copy executables\\manual_scheduler.py %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
139+
"DestructorCMD_Unix": "rm ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
140+
"DestructorCMD_Win32": "del %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
141+
"Filename": "manual_scheduler_5f8125f5",
142+
"HighlightState": true,
143+
"Iconname": "ManualScheduler",
144+
"Id": 1602299381,
145+
"License": "GPLv3",
146+
"ObjectName": "ManualScheduler - 0x5f8125f5",
147+
"Parents": [],
148+
"Plug": true,
149+
"Position": {
150+
"x": 51,
151+
"y": 44
152+
},
153+
"PythonicVersion": {
154+
"Major": 1,
155+
"Minor": 3
156+
},
157+
"Socket": false,
158+
"Typename": "ManualScheduler",
159+
"Version": {
160+
"Major": 0,
161+
"Minor": 1
162+
}
163+
},
164+
{
165+
"AllowStream": false,
166+
"AreaNo": 0,
167+
"Author": "Stephan Avenwedde",
168+
"Childs": [
169+
749194611
170+
],
171+
"Config": {
172+
"GeneralConfig": {
173+
"Autostart": false,
174+
"Debug": false,
175+
"Logging": false,
176+
"MP": false
177+
}
178+
},
179+
"ConstructorCMD_Unix": "cp -u executables/stop_process.py ~/Pythonic/executables/manual_stop_process_BASICDATA_Id.py",
180+
"ConstructorCMD_Win32": "copy executables\\stop_process.py %HOMEPATH%\\Pythonic\\executables\\manual_stop_process_BASICDATA_Id.py",
181+
"DestructorCMD_Unix": "rm ~/Pythonic/executables/manual_stop_process_BASICDATA_Id.py",
182+
"DestructorCMD_Win32": "del %HOMEPATH%\\Pythonic\\executables\\manual_stop_process_BASICDATA_Id.py",
183+
"Filename": "manual_stop_process_36577a3c",
184+
"HighlightState": true,
185+
"Iconname": "ManualStopProcess",
186+
"Id": 911702588,
187+
"License": "GPLv3",
188+
"ObjectName": "ManualStopProcess - 0x36577a3c",
189+
"Parents": [],
190+
"Plug": true,
191+
"Position": {
192+
"x": 66,
193+
"y": 418
194+
},
195+
"PythonicVersion": {
196+
"Major": 1,
197+
"Minor": 3
198+
},
199+
"Socket": false,
200+
"Typename": "ManualStopProcess",
201+
"Version": {
202+
"Major": 0,
203+
"Minor": 1
204+
}
205+
},
206+
{
207+
"AllowStream": false,
208+
"AreaNo": 0,
209+
"Author": "Stephan Avenwedde",
210+
"Childs": [
211+
749194611
212+
],
213+
"Config": {
214+
"GeneralConfig": {
215+
"Autostart": false,
216+
"Debug": false,
217+
"Logging": false,
218+
"MP": false
219+
}
220+
},
221+
"ConstructorCMD_Unix": "cp -u executables/generic_pipe.py ~/Pythonic/executables/generic_pipe_BASICDATA_Id.py",
222+
"ConstructorCMD_Win32": "copy executables\\generic_pipe.py %HOMEPATH%\\Pythonic\\executables\\generic_pipe_BASICDATA_Id.py",
223+
"DestructorCMD_Unix": "rm ~/Pythonic/executables/generic_pipe_BASICDATA_Id.py",
224+
"DestructorCMD_Win32": "del %HOMEPATH%\\Pythonic\\executables\\generic_pipe_BASICDATA_Id.py",
225+
"Filename": "generic_pipe_0853b094",
226+
"HighlightState": false,
227+
"Iconname": "GenericPipe",
228+
"Id": 139702420,
229+
"License": "GPLv3",
230+
"ObjectName": "GenericPipe - 0x0853b094",
231+
"Parents": [
232+
1197140461
233+
],
234+
"Plug": true,
235+
"Position": {
236+
"x": 272,
237+
"y": 244
238+
},
239+
"PythonicVersion": {
240+
"Major": 1,
241+
"Minor": 2
242+
},
243+
"Socket": true,
244+
"Typename": "GenericPipe",
245+
"Version": {
246+
"Major": 0,
247+
"Minor": 1
248+
}
249+
},
250+
{
251+
"AllowStream": true,
252+
"AreaNo": 0,
253+
"Author": "Stephan Avenwedde",
254+
"Childs": [
255+
139702420
256+
],
257+
"Config": {
258+
"GeneralConfig": {
259+
"Autostart": false,
260+
"Debug": false,
261+
"Logging": false,
262+
"MP": false
263+
}
264+
},
265+
"ConstructorCMD_Unix": "cp -u executables/manual_scheduler.py ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
266+
"ConstructorCMD_Win32": "copy executables\\manual_scheduler.py %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
267+
"DestructorCMD_Unix": "rm ~/Pythonic/executables/manual_scheduler_BASICDATA_Id.py",
268+
"DestructorCMD_Win32": "del %HOMEPATH%\\Pythonic\\executables\\manual_scheduler_BASICDATA_Id.py",
269+
"Filename": "manual_scheduler_475ae9ed",
270+
"HighlightState": true,
271+
"Iconname": "ManualScheduler",
272+
"Id": 1197140461,
273+
"License": "GPLv3",
274+
"ObjectName": "ManualScheduler - 0x475ae9ed",
275+
"Parents": [],
276+
"Plug": true,
277+
"Position": {
278+
"x": -32,
279+
"y": 182
280+
},
281+
"PythonicVersion": {
282+
"Major": 1,
283+
"Minor": 3
284+
},
285+
"Socket": false,
286+
"Typename": "ManualScheduler",
287+
"Version": {
288+
"Major": 0,
289+
"Minor": 1
290+
}
291+
}
292+
]
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import time, queue
2+
try:
3+
from element_types import Record, Function, ProcCMD, GuiCMD
4+
except ImportError:
5+
from Pythonic.element_types import Record, Function, ProcCMD, GuiCMD
6+
7+
class Element(Function):
8+
9+
def __init__(self, id, config, inputData, return_queue, cmd_queue):
10+
super().__init__(id, config, inputData, return_queue, cmd_queue)
11+
12+
13+
def execute(self):
14+
15+
16+
#####################################
17+
# #
18+
# REFERENCE IMPLEMENTATION #
19+
# #
20+
#####################################
21+
22+
23+
24+
output = "Hello"
25+
26+
27+
28+
#########################################
29+
# #
30+
# The execution exits immediately #
31+
# after providing output data #
32+
# #
33+
#########################################
34+
35+
recordDone = Record(output, 'Sending value of cnt: {}'.format(output))
36+
self.return_queue.put(recordDone)

0 commit comments

Comments
 (0)