Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Delphi run python script from file

Reply
Thread Tools

Delphi run python script from file

 
 
Shane
Guest
Posts: n/a
 
      06-09-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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run a python script as an exe and run a new process from it venutaurus539@gmail.com Python 9 02-27-2009 05:22 PM
how to do "load script; run script" in a loop in embedded python? lipingffeng@gmail.com Python 1 04-07-2008 06:00 AM
Error when python script run as cgi script sophie_newbie Python 3 10-22-2007 05:39 PM
run a script and supply commands from a python cgi script moishyyehuda@gmail.com Python 1 12-14-2006 05:16 PM
how do i run another script from my python script nephish@xit.net Python 5 10-28-2005 02:06 AM



Advertisments