Skip to content

Commit 240e0ee

Browse files
authored
Merge pull request #34 from hANSIc99/dev
0.19 Release
2 parents 80769fb + 1dabd20 commit 240e0ee

File tree

99 files changed

+6758
-971
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+6758
-971
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name = 'Pythonic',
8-
version = '0.18',
8+
version = '0.19',
99
author = 'Stephan Avenwedde',
1010
author_email = '[email protected]',
1111
license = 'GPLv3',

src/Pythonic/.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python: Aktuelle Datei",
9+
"type": "python",
10+
"request": "launch",
11+
"program": "main.py",
12+
"console": "integratedTerminal"
13+
}
14+
]
15+
}

src/Pythonic/binancetools.py renamed to src/Pythonic/cryptotools.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
from Pythonic.mastertool import MasterTool
88

99

10-
class BinanceTools(QFrame):
10+
class CryptoTools(QFrame):
1111

12-
reg_tool = pyqtSignal(tuple, name='register_tool_binance')
12+
reg_tool = pyqtSignal(tuple, name='register_tool_cryptos')
1313

1414
def __init__(self, parent):
1515
super().__init__(parent)
@@ -31,9 +31,13 @@ def initUI(self):
3131
self.order = MasterTool(self, 'BinanceOrder', 1)
3232
self.order.setPixmap(QPixmap(join(mod_path, 'images/BinanceOrder.png')).scaled(120, 60))
3333

34+
self.ccxt = MasterTool(self, 'CCXT', 1)
35+
self.ccxt.setPixmap(QPixmap(join(mod_path, 'images/CCXT.png')).scaled(120, 60))
36+
3437
self.layout_h.addWidget(self.scheduler)
3538
self.layout_h.addWidget(self.ohlc)
3639
self.layout_h.addWidget(self.order)
40+
self.layout_h.addWidget(self.ccxt)
3741
self.layout_h.addStretch(1)
3842

3943
self.setLayout(self.layout_h)
@@ -69,9 +73,10 @@ def mousePressEvent(self, event):
6973
child.setPixmap(pixmap)
7074

7175
def register_tools(self):
72-
logging.debug('BinanceTools::register_tools() called')
76+
logging.debug('CryptoTools::register_tools() called')
7377
self.reg_tool.emit(self.scheduler.toolData())
7478
self.reg_tool.emit(self.ohlc.toolData())
7579
self.reg_tool.emit(self.order.toolData())
80+
self.reg_tool.emit(self.ccxt.toolData())
7681

7782

src/Pythonic/elementmaster.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def __init__(self, row, column, pixmap, state_iconBar, config, self_sync=False):
3030
# flag indicates if programm should stop in debugging mode
3131
self.b_debug = False
3232
# add function dummy
33+
# real function is added by calling self.addFunction()
3334
self.function = Function(None, self.b_debug, row, column)
3435

3536
# family tree

src/Pythonic/elements/basic_operation.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,14 @@ def loadLastConfig(self):
146146
'""" set the output variable to pass data to following elements """')
147147
self.placeholder_3 = QC.translate('',
148148
'""" set the variable log_txt to adjust the logging text """')
149+
self.placeholder_4 = QC.translate('',
150+
'""" use the variable callback to pass data without returning """')
149151
self.code_input.setPlaceholderText(self.placeholder_1 + '\r\n\r\n' +
150152
'print(input)\r\n\r\n' +
151153
self.placeholder_2 +
152154
'\r\n\r\n' + 'output = 5\r\n\r\n' +
153155
self.placeholder_3 + '\r\n\r\n' +
156+
self.placeholder_4 + '\r\n\r\n' +
154157
'log_txt = "debug text"')
155158

156159
if cmd:

src/Pythonic/elements/basic_operation_func.py

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
1-
from Pythonic.record_function import Record, Function
1+
from Pythonic.record_function import Record, Function, PipeRecord
2+
import time
3+
4+
from PyQt5.QtCore import QObject
5+
from PyQt5.QtCore import pyqtSignal
26

37
class OperationFunction(Function):
48

9+
510
def __init__(self, config, b_debug, row, column):
611
super().__init__(config, b_debug, row, column)
712

813
def execute(self, record):
914

1015
log_state, code_input, custom_edit_state, cmd = self.config
1116

12-
proc_dict = {'record' : record, 'input' : None, 'output' : None, 'log_txt' : None}
17+
proc_dict = {'record' : record, 'callback' : self.callback, 'pos' : self.getPos,
18+
'input' : None, 'output' : None, 'log_txt' : None}
1319

1420

1521
exec_string = 'input = record\r\n'
@@ -20,6 +26,20 @@ def execute(self, record):
2026

2127
exec(exec_string, proc_dict)
2228

29+
30+
"""
31+
n_cnt = 0
32+
33+
while True:
34+
n_cnt += 1
35+
# switch grid
36+
#ret_data = PipeRecord(self.getPos(), (1, self.row+1, self.column), n_cnt)
37+
my_text = 'Hello log'
38+
ret_data = PipeRecord(self.getPos(), (self.row+1, self.column), n_cnt, True, my_text)
39+
self.callback(ret_data)
40+
time.sleep(2)
41+
"""
42+
2343
output = proc_dict['output']
2444
log_txt = proc_dict['log_txt']
2545
if log_txt:

src/Pythonic/elements/basic_sched_func.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
from datetime import datetime, date, time, timedelta
44
from Pythonic.record_function import Record, Function
55

6+
67
class BasicScheduler(Function):
78

8-
def __init(self, config, b_debug, row, column):
9+
def __init__(self, config, b_debug, row, column):
910

1011
super().__init__(config, b_debug, row, column)
1112

0 commit comments

Comments
 (0)