Skip to content

Commit 0080c99

Browse files
committed
Removed python 2 support
Corrected and simplified the interface
1 parent 27e7b2e commit 0080c99

38 files changed

+1949
-3024
lines changed

Demos/Demo06/Unit1.dfm

+175-175
Original file line numberDiff line numberDiff line change
@@ -1,175 +1,175 @@
1-
object Form1: TForm1
2-
Left = 233
3-
Top = 175
4-
Caption = 'Demo of Python'
5-
ClientHeight = 337
6-
ClientWidth = 528
7-
Color = clBtnFace
8-
Font.Charset = DEFAULT_CHARSET
9-
Font.Color = clWindowText
10-
Font.Height = -11
11-
Font.Name = 'MS Sans Serif'
12-
Font.Style = []
13-
OldCreateOrder = True
14-
PixelsPerInch = 96
15-
TextHeight = 13
16-
object Splitter1: TSplitter
17-
Left = 0
18-
Top = 145
19-
Width = 528
20-
Height = 3
21-
Cursor = crVSplit
22-
Align = alTop
23-
ExplicitWidth = 536
24-
end
25-
object Memo1: TMemo
26-
Left = 0
27-
Top = 148
28-
Width = 528
29-
Height = 121
30-
Align = alClient
31-
Font.Charset = DEFAULT_CHARSET
32-
Font.Color = clWindowText
33-
Font.Height = -13
34-
Font.Name = 'Consolas'
35-
Font.Style = []
36-
Lines.Strings = (
37-
'import sys'
38-
'import spam'
39-
'print (spam.foo('#39'hello world'#39', 1))'
40-
'p = spam.CreatePoint( 10, 25 )'
41-
'print ("Point:", p)'
42-
'p.x = 58'
43-
'print (p.x, p)'
44-
'p.OffsetBy( 5, 5 )'
45-
'print (p)'
46-
'print ("Current value of var test is: ", test)'
47-
'test.Value = "New value set by Python"'
48-
'print ("getdouble: ", spam.getdouble())')
49-
ParentFont = False
50-
ScrollBars = ssVertical
51-
TabOrder = 1
52-
end
53-
object Panel1: TPanel
54-
Left = 0
55-
Top = 269
56-
Width = 528
57-
Height = 68
58-
Align = alBottom
59-
BevelOuter = bvNone
60-
TabOrder = 0
61-
object Button1: TButton
62-
Left = 6
63-
Top = 8
64-
Width = 115
65-
Height = 25
66-
Caption = 'Execute script'
67-
TabOrder = 0
68-
OnClick = Button1Click
69-
end
70-
object Button2: TButton
71-
Left = 168
72-
Top = 8
73-
Width = 91
74-
Height = 25
75-
Caption = 'Load script...'
76-
TabOrder = 1
77-
OnClick = Button2Click
78-
end
79-
object Button3: TButton
80-
Left = 264
81-
Top = 8
82-
Width = 89
83-
Height = 25
84-
Caption = 'Save script...'
85-
TabOrder = 2
86-
OnClick = Button3Click
87-
end
88-
object Button4: TButton
89-
Left = 368
90-
Top = 8
91-
Width = 89
92-
Height = 25
93-
Caption = 'Show var test'
94-
TabOrder = 3
95-
OnClick = Button4Click
96-
end
97-
object Edit1: TEdit
98-
Left = 368
99-
Top = 32
100-
Width = 161
101-
Height = 21
102-
TabOrder = 4
103-
Text = 'Edit1'
104-
end
105-
end
106-
object Memo2: TMemo
107-
Left = 0
108-
Top = 0
109-
Width = 528
110-
Height = 145
111-
Align = alTop
112-
Font.Charset = DEFAULT_CHARSET
113-
Font.Color = clWindowText
114-
Font.Height = -13
115-
Font.Name = 'Consolas'
116-
Font.Style = []
117-
Lines.Strings = (
118-
'Memo2')
119-
ParentFont = False
120-
TabOrder = 2
121-
end
122-
object PythonEngine1: TPythonEngine
123-
InitScript.Strings = (
124-
'import sys'
125-
'print ("Python Dll: ", sys.version)'
126-
'print (sys.copyright)'
127-
'print')
128-
IO = PythonGUIInputOutput1
129-
Left = 8
130-
end
131-
object PythonType1: TPythonType
132-
Engine = PythonEngine1
133-
OnInitialization = PythonType1Initialization
134-
TypeName = 'Point'
135-
Prefix = 'Create'
136-
Services.Basic = [bsGetAttr, bsSetAttr, bsRepr, bsStr]
137-
Services.InplaceNumber = []
138-
Services.Number = []
139-
Services.Sequence = []
140-
Services.Mapping = []
141-
Left = 72
142-
end
143-
object PythonModule1: TPythonModule
144-
Engine = PythonEngine1
145-
OnInitialization = PythonModule1Initialization
146-
ModuleName = 'spam'
147-
Errors = <>
148-
Left = 104
149-
end
150-
object OpenDialog1: TOpenDialog
151-
DefaultExt = '*.py'
152-
Filter = 'Python files|*.py|Text files|*.txt|All files|*.*'
153-
Left = 176
154-
end
155-
object SaveDialog1: TSaveDialog
156-
DefaultExt = '*.py'
157-
Filter = 'Python files|*.py|Text files|*.txt|All files|*.*'
158-
Left = 208
159-
end
160-
object PythonDelphiVar1: TPythonDelphiVar
161-
Engine = PythonEngine1
162-
Module = '__main__'
163-
VarName = 'test'
164-
OnGetData = PythonDelphiVar1GetData
165-
OnSetData = PythonDelphiVar1SetData
166-
OnChange = PythonDelphiVar1Change
167-
Left = 136
168-
end
169-
object PythonGUIInputOutput1: TPythonGUIInputOutput
170-
UnicodeIO = True
171-
RawOutput = False
172-
Output = Memo2
173-
Left = 40
174-
end
175-
end
1+
object Form1: TForm1
2+
Left = 233
3+
Top = 175
4+
Caption = 'Demo of Python'
5+
ClientHeight = 337
6+
ClientWidth = 528
7+
Color = clBtnFace
8+
Font.Charset = DEFAULT_CHARSET
9+
Font.Color = clWindowText
10+
Font.Height = -11
11+
Font.Name = 'MS Sans Serif'
12+
Font.Style = []
13+
OldCreateOrder = True
14+
PixelsPerInch = 96
15+
TextHeight = 13
16+
object Splitter1: TSplitter
17+
Left = 0
18+
Top = 145
19+
Width = 528
20+
Height = 3
21+
Cursor = crVSplit
22+
Align = alTop
23+
ExplicitWidth = 536
24+
end
25+
object Memo1: TMemo
26+
Left = 0
27+
Top = 148
28+
Width = 528
29+
Height = 121
30+
Align = alClient
31+
Font.Charset = DEFAULT_CHARSET
32+
Font.Color = clWindowText
33+
Font.Height = -13
34+
Font.Name = 'Consolas'
35+
Font.Style = []
36+
Lines.Strings = (
37+
'import sys'
38+
'import spam'
39+
'print (spam.foo('#39'hello world'#39', 1))'
40+
'p = spam.CreatePoint( 10, 25 )'
41+
'print ("Point:", p)'
42+
'p.x = 58'
43+
'print (p.x, p)'
44+
'p.OffsetBy( 5, 5 )'
45+
'print (p)'
46+
'print ("Current value of var test is: ", test)'
47+
'test.Value = "New value set by Python"'
48+
'print ("getdouble: ", spam.getdouble())')
49+
ParentFont = False
50+
ScrollBars = ssVertical
51+
TabOrder = 1
52+
end
53+
object Panel1: TPanel
54+
Left = 0
55+
Top = 269
56+
Width = 528
57+
Height = 68
58+
Align = alBottom
59+
BevelOuter = bvNone
60+
TabOrder = 0
61+
object Button1: TButton
62+
Left = 6
63+
Top = 8
64+
Width = 115
65+
Height = 25
66+
Caption = 'Execute script'
67+
TabOrder = 0
68+
OnClick = Button1Click
69+
end
70+
object Button2: TButton
71+
Left = 168
72+
Top = 8
73+
Width = 91
74+
Height = 25
75+
Caption = 'Load script...'
76+
TabOrder = 1
77+
OnClick = Button2Click
78+
end
79+
object Button3: TButton
80+
Left = 264
81+
Top = 8
82+
Width = 89
83+
Height = 25
84+
Caption = 'Save script...'
85+
TabOrder = 2
86+
OnClick = Button3Click
87+
end
88+
object Button4: TButton
89+
Left = 368
90+
Top = 8
91+
Width = 89
92+
Height = 25
93+
Caption = 'Show var test'
94+
TabOrder = 3
95+
OnClick = Button4Click
96+
end
97+
object Edit1: TEdit
98+
Left = 368
99+
Top = 32
100+
Width = 161
101+
Height = 21
102+
TabOrder = 4
103+
Text = 'Edit1'
104+
end
105+
end
106+
object Memo2: TMemo
107+
Left = 0
108+
Top = 0
109+
Width = 528
110+
Height = 145
111+
Align = alTop
112+
Font.Charset = DEFAULT_CHARSET
113+
Font.Color = clWindowText
114+
Font.Height = -13
115+
Font.Name = 'Consolas'
116+
Font.Style = []
117+
Lines.Strings = (
118+
'Memo2')
119+
ParentFont = False
120+
TabOrder = 2
121+
end
122+
object PythonEngine1: TPythonEngine
123+
InitScript.Strings = (
124+
'import sys'
125+
'print ("Python Dll: ", sys.version)'
126+
'print (sys.copyright)'
127+
'print')
128+
IO = PythonGUIInputOutput1
129+
Left = 8
130+
end
131+
object PythonType1: TPythonType
132+
Engine = PythonEngine1
133+
OnInitialization = PythonType1Initialization
134+
TypeName = 'Point'
135+
Prefix = 'Create'
136+
Services.Basic = [bsGetAttr, bsSetAttr, bsRepr, bsStr]
137+
Services.InplaceNumber = []
138+
Services.Number = []
139+
Services.Sequence = []
140+
Services.Mapping = []
141+
Left = 72
142+
end
143+
object PythonModule1: TPythonModule
144+
Engine = PythonEngine1
145+
OnInitialization = PythonModule1Initialization
146+
ModuleName = 'spam'
147+
Errors = <>
148+
Left = 104
149+
end
150+
object OpenDialog1: TOpenDialog
151+
DefaultExt = '*.py'
152+
Filter = 'Python files|*.py|Text files|*.txt|All files|*.*'
153+
Left = 176
154+
end
155+
object SaveDialog1: TSaveDialog
156+
DefaultExt = '*.py'
157+
Filter = 'Python files|*.py|Text files|*.txt|All files|*.*'
158+
Left = 208
159+
end
160+
object PythonDelphiVar1: TPythonDelphiVar
161+
Engine = PythonEngine1
162+
Module = '__main__'
163+
VarName = 'test'
164+
OnGetData = PythonDelphiVar1GetData
165+
OnSetData = PythonDelphiVar1SetData
166+
OnChange = PythonDelphiVar1Change
167+
Left = 136
168+
end
169+
object PythonGUIInputOutput1: TPythonGUIInputOutput
170+
UnicodeIO = True
171+
RawOutput = False
172+
Output = Memo2
173+
Left = 40
174+
end
175+
end

0 commit comments

Comments
 (0)