Difference between revisions of "Using Python in Lazarus on Windows/Linux"

From Free Pascal wiki
Jump to navigationJump to search
Line 11: Line 11:
 
* [https://github.com/Alexey-T/SynLite app]
 
* [https://github.com/Alexey-T/SynLite app]
  
Work on Ubuntu x64
+
Work on Ubuntu 14.04 x64
  
 
[[File:Python app Linux.png]]
 
[[File:Python app Linux.png]]
  
Work on Windows7
+
Work on Windows7 x64
  
 
[[File:Python app Windows.png]]
 
[[File:Python app Windows.png]]
 +
 +
= Make code =
 +
== P4D ==
 +
 +
Package "P4Dlaz.dpk": delete all refs to units "...Delphi..."; remove usage of units in code. Make modifications to PythonEngine.pas, see lines with "//AT". Compile and use package. You must see "Python" tab appeared in component pallette.
 +
 +
== Program ==

Revision as of 22:28, 8 February 2015

Intro

I need to make app, cross platform, Win/Linux, which embeds Python engine. I tried Python4Delphi, but it doesn't compile and work on Linux x64. Same app must run on Win and Linux, must use portable Python 3 on Win and system Python 3 on Linux.

Result

Links

Work on Ubuntu 14.04 x64

Python app Linux.png

Work on Windows7 x64

Python app Windows.png

Make code

P4D

Package "P4Dlaz.dpk": delete all refs to units "...Delphi..."; remove usage of units in code. Make modifications to PythonEngine.pas, see lines with "//AT". Compile and use package. You must see "Python" tab appeared in component pallette.

Program