Delphi run python script from file

Discussion in 'Python' started by Shane, Jun 9, 2004.

  1. Shane

    Shane Guest

    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
     
    Shane, Jun 9, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PythonMan

    Any Software can Python <-> Delphi ?

    PythonMan, Jul 28, 2003, in forum: Python
    Replies:
    3
    Views:
    559
    Brad Clements
    Jul 29, 2003
  2. Dang
    Replies:
    4
    Views:
    1,052
    Dang Griffith
    Oct 15, 2003
  3. Ashley Lloyd
    Replies:
    1
    Views:
    410
    Jarek Zgoda
    Jan 7, 2004
  4. John Tiedeman

    Delphi/Kylix and Python

    John Tiedeman, Dec 2, 2004, in forum: Python
    Replies:
    1
    Views:
    359
    Tim Roberts
    Dec 5, 2004
  5. Replies:
    9
    Views:
    977
    Paddy O'Loughlin
    Feb 27, 2009
Loading...

Share This Page