Delphi run python script from file

Shane shane at hcmglobal.com
Wed Jun 9 03:18:07 CEST 2004


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



More information about the Python-list mailing list