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