Delphi run python script from file

S

Shane

Greetings,

I've been trying to get PyRun_SimpleFile to work from Delphi without
success, has any one done this?

Doing it in C/C++ is trivial, but I need Delphi and I'm not a Delphi
expert.

In Delphi I've managed to load/unload/initialize/import/etc the python
dll/functions and get PyRun_SimpleString to work no problem.

PyRun_SimpleFile just causes an 'Access Violation' error.

I've poked arround inside Python-for-Delphi but it doesn't seem to support
execution from python files.

I'd like to avoid COM.

The ultimate objective is to be able to use/distribute .pyc files and to
get PyRun_File working.

Can anyone help ?
Thanks.

ENV
+++++++
Win2k
Delphi 7
Python 2.3.3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top