Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Sample code for object creation via pyd-file #473

Answered by pyscripter
Nesavi asked this question in Q&A
Discussion options

I'd like to be able to create instance of a given class, and do this via a pyd-file. In the demos there seems to "only" samples from GUI-applications? Is there a sample where this is done at run time?

You must be logged in to vote

Please see the examples of created python extension modules (pyd extension) in the Modules subdirectory.

Replies: 1 comment 2 replies

Comment options

Please see the examples of created python extension modules (pyd extension) in the Modules subdirectory.

You must be logged in to vote
2 replies
Comment options

I think I may have not formulated myself very clearly. What I was looking for was sample code, that allows me to expose the constructtion of Delphi types in Python. I went through the demo more carefully, and I believe what I am looking for is Demo34, where instances of a type TPoint are created in a Python-scrip.

Comment options

You may want to have a look at https://github.com/pyscripter/python4delphi/blob/master/Tests/WrapDelphiTest.pas which shows/tests different ways of exposing delphi objects, interfaces and records.

Answer selected by Nesavi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels

AltStyle によって変換されたページ (->オリジナル) /