Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Demos/Demo01/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo02/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
5 changes: 0 additions & 5 deletions Demos/Demo03/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ object Form1: TForm1
ParentFont = False
ScrollBars = ssBoth
TabOrder = 1
ExplicitTop = 164
ExplicitWidth = 528
ExplicitHeight = 136
end
object Panel1: TPanel
Left = 0
Expand All @@ -59,8 +56,6 @@ object Form1: TForm1
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
ExplicitTop = 300
ExplicitWidth = 528
object Button1: TButton
Left = 6
Top = 8
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo03/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs, StdCtrls,
ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo04/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
1 change: 0 additions & 1 deletion Demos/Demo05/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ object Form1: TForm1
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
ExplicitTop = 306
object Button1: TButton
Left = 6
Top = 8
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo05/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo06/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo07/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo08/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo09/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo10_FireDAC/fmMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
System.Types, System.UITypes,
ComCtrls, ExtCtrls, StdCtrls, PythonEngine, PythonGUIInputOutput, Db,
ComCtrls, ExtCtrls, StdCtrls, PythonEngine, Vcl.PythonGUIInputOutput, Db,
Grids, DBGrids, Datasnap.DBClient, FireDAC.Stan.Intf, FireDAC.Stan.Option,
FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def,
FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.FMXUI.Wait,
Expand Down
3 changes: 0 additions & 3 deletions Demos/Demo16/Example1/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ object Form1: TForm1
Align = alClient
BevelOuter = bvNone
TabOrder = 1
ExplicitWidth = 372
object Splitter2: TSplitter
Left = 0
Top = 153
Expand Down Expand Up @@ -204,7 +203,6 @@ object Form1: TForm1
ParentFont = False
ScrollBars = ssBoth
TabOrder = 0
ExplicitWidth = 372
end
object Memo2: TMemo
Left = 0
Expand All @@ -219,7 +217,6 @@ object Form1: TForm1
Font.Style = []
ParentFont = False
TabOrder = 1
ExplicitWidth = 372
end
end
object PythonEngine1: TPythonEngine
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo16/Example1/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo16/Example2/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
3 changes: 0 additions & 3 deletions Demos/Demo17/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ object Form1: TForm1
ParentFont = False
ScrollBars = ssBoth
TabOrder = 1
ExplicitTop = 276
ExplicitHeight = 100
end
object Panel1: TPanel
Left = 0
Expand All @@ -53,7 +51,6 @@ object Form1: TForm1
Align = alBottom
BevelOuter = bvNone
TabOrder = 0
ExplicitTop = 349
object Button1: TButton
Left = 6
Top = 8
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo17/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
Variants, PythonEngine, PythonGUIInputOutput;
Variants, PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo21/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo22/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo23/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo25/fmMain.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils, Variants,
Windows, Messages, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput, Contnrs;
PythonEngine, Vcl.PythonGUIInputOutput, Contnrs;

type
TMain = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo26/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo27/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, PythonEngine, PythonGUIInputOutput, StdCtrls;
Dialogs, PythonEngine, Vcl.PythonGUIInputOutput, StdCtrls;

type
TMySeq = class(TPyObject)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo28/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TPyStringList = class(TPyObject)
Expand Down
2 changes: 0 additions & 2 deletions Demos/Demo29/Unit1.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,6 @@ object Form1: TForm1
ScrollBars = ssBoth
TabOrder = 2
WordWrap = False
ExplicitLeft = 16
ExplicitTop = 352
end
object Memo2: TMemo
Left = 8
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo29/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtDlgs, StdCtrls, ExtCtrls, PythonEngine, PythonGUIInputOutput;
Dialogs, ExtDlgs, StdCtrls, ExtCtrls, PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo30/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
Classes, SysUtils,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ComCtrls, ExtCtrls,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo31/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
PythonEngine, PythonGUIInputOutput, WrapDelphi, ActnList, System.Actions;
PythonEngine, Vcl.PythonGUIInputOutput, WrapDelphi, ActnList, System.Actions;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo32/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls,
WrapDelphi, WrapDelphiClasses,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo33/ThSort.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
ExtCtrls, StdCtrls,
PythonEngine, PythonGUIInputOutput, SortThds;
PythonEngine, Vcl.PythonGUIInputOutput, SortThds;

type
TThreadSortForm = class(TForm)
Expand Down
2 changes: 1 addition & 1 deletion Demos/Demo34/Unit1.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface
SysUtils, Classes,
Windows, Messages, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, ComCtrls, PythonVersions,
PythonEngine, PythonGUIInputOutput;
PythonEngine, Vcl.PythonGUIInputOutput;

type
TForm1 = class(TForm)
Expand Down
7 changes: 7 additions & 0 deletions Source/PythonEngine.pas
Original file line number Diff line number Diff line change
Expand Up @@ -2670,6 +2670,7 @@ function PythonToDelphi( obj : PPyObject ) : TPyObject;
function IsDelphiObject( obj : PPyObject ) : Boolean;
procedure PyObjectDestructor( pSelf : PPyObject); cdecl;
procedure FreeSubtypeInst(ob:PPyObject); cdecl;
procedure Register;
function PyType_HasFeature(AType : PPyTypeObject; AFlag : Integer) : Boolean;
function GetPythonVersionFromDLLName(const DLLFileName : string): string;

Expand Down Expand Up @@ -8791,6 +8792,12 @@ function IsDelphiObject( obj : PPyObject ) : Boolean;
end;
end;

procedure Register;
begin
RegisterComponents('Python',[ TPythonEngine, TPythonInputOutput,
TPythonType, TPythonModule, TPythonDelphiVar]);
end;

function GetPythonVersionFromDLLName(const DLLFileName : string): string;
begin
Result := DLLFileName[{$IFDEF MSWINDOWS}7{$ELSE}10{$ENDIF}] + '.' + DLLFileName[{$IFDEF MSWINDOWS}8{$ELSE}11{$ENDIF}];
Expand Down
7 changes: 7 additions & 0 deletions Source/vcl/Vcl.PythonGUIInputOutput.pas
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ TPythonGUIInputOutput = class(TPythonInputOutput)
property Output : TCustomMemo read FCustomMemo write FCustomMemo;
end;

procedure Register;

implementation

{$IFDEF FPC}
Expand Down Expand Up @@ -246,4 +248,9 @@ procedure TPythonGUIInputOutput.DisplayString( const str : string );

{------------------------------------------------------------------------------}

procedure Register;
begin
RegisterComponents('Python', [TPythonGUIInputOutput]);
end;

end.