473,545 Members | 1,995 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Delphi run python script from file

Greetings,

I've been trying to get PyRun_SimpleFil e 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_SimpleStr ing to work no problem.

PyRun_SimpleFil e 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
Jul 18 '05 #1
0 1438

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2644
by: PythonMan | last post by:
Any Software can change Python source code to Delphi ? thx --
8
4007
by: achrist | last post by:
I'm aving some trouble getting callbacks from a Delphi DLL back to python working through ctypes. The call from python to the DLL works fine. In the Delphi(5) code: type TCallbackFunc = function(x: Integer): Integer; stdcall;
4
1893
by: Donald L. Dietmeyer | last post by:
I was given a libxx.so that was probably written in Delphi. I need to wrap it so that I can call the functions/procedures of the library from Python. I tried the usual extension technique compiling a C file. I don't get anything meaningful back when I call, so it doesn't work, or I am missing some critical point. I have spent a good deal...
0
1584
by: Tom | last post by:
delphi 7 python 2.3 win98 Python for Delphi V3.25 In Delphi: 1 Create a new Form ; 2 Drop a TMemo(Memo1) to contain python code; 3 Drop a TPythonInputOutput (PythonInputOutput1) ;
15
1874
by: windozbloz | last post by:
Bye Bye Billy Bob... I'm back with one more question, then I'll chill. I have scoured the news and net for info about Borlands KYLIX 3 and have found little technical info about it. Their screen shots are very impressive, similar to Visual Basic. I have sent several emails to Borlands Sales and Pre-Sales departments. Pre-Sales bounces...
5
2203
by: Just call me James | last post by:
Hi, Coming away from the luxury of the delphi IDE has been something of a shock. As a consequence I've become aware that maybe I need to spend some money on a python IDE. As a beginner I reckon integrated debugging would be helpful.
6
9900
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
2
1867
by: Larry Bates | last post by:
I have a rather large Python class that I've converted to a COM object. I can dispatch (using either Python or VB) and call the methods perfectly. Now a new client wants to call it from Delphi. Can anyone out there give me any pointers on how that would be done. Are there any "gotchas" about the way arguments or return values would need...
11
2890
by: gnuist006 | last post by:
Is there a Delphi equivalent in the C world or Scheme/LISP world ? Recently, Delphi is in resurgence. In Russia people are using like crazy. For example, Bolega has written a free image processing program scankromsator in delphi because its easy to write a gui. In arabia people are using it also. Also delphi, I heard delphi allows visual...
0
7484
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7928
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5997
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5344
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3451
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1902
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1030
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
726
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.