473,320 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

calling php function from python

is it possible to call a php function from python and use a class from
php in python? i want to use mmslib which creates mms messages and the
only implementation is a php mmslib implementation.
thanks a lot!
mark
Feb 14 '07 #1
3 5412

mark wrote:
is it possible to call a php function from python and use a class from
php in python? i want to use mmslib which creates mms messages and the
only implementation is a php mmslib implementation.
You can consider to use some kind of RPC (remote procedure call)
for example XML-RPC. This is a platform and language independent
solution.
Here you have some information:
http://www.faqs.org/docs/Linux-HOWTO/XML-RPC-HOWTO.html
http://groups.google.pl/group/comp.l...6ae6290593fc97

--
HTH,
Rob

Feb 14 '07 #2
Rob Wolfe wrote:
>
mark wrote:
>is it possible to call a php function from python and use a class from
php in python? i want to use mmslib which creates mms messages and the
only implementation is a php mmslib implementation.

You can consider to use some kind of RPC (remote procedure call)
for example XML-RPC. This is a platform and language independent
solution.
Here you have some information:
http://www.faqs.org/docs/Linux-HOWTO/XML-RPC-HOWTO.html
http://groups.google.pl/group/comp.l...6ae6290593fc97
For a quickstart it's probably easier to run the PHP code using the CGI
version of the PHP interpreter. E.g.
os.system('/usr/bin/php mms.php')
or using the subprocess module, if you want to pass some data to the script
(using stdin/out).

As long as no remote PHP server is involved this is easier and perhaps even
faster than the RPC approach...

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/
Feb 14 '07 #3
mark wrote:
is it possible to call a php function from python and use a class from
php in python? i want to use mmslib which creates mms messages and the
only implementation is a php mmslib implementation.
Do yourself - and the python community... :) - a favor and just translate
the mmslib code to python. It is easy and straightforward todo.

Diez
Feb 14 '07 #4

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

Similar topics

0
by: Natsu Mizutani | last post by:
Hello, I'm trying to wrap a c++ library using MPI inside with boost.python (or SWIG). I managed to find that calling `MPI::Init()` embeded in a c++ funtion would not work. So, I decided to use...
2
by: Satish Chimakurthi | last post by:
Hi all, My question is surely a basic one, but somehow, I am not able to figure it out. I have a python file "satish.py" as follows: *satish.py* def main(): y()
11
by: Kamilche | last post by:
What a debug nightmare! I just spent HOURS running my script through the debugger, sprinkling in log statements, and the like, tracking down my problem. I called a function without the ending...
3
by: Travis Berg | last post by:
I'm running into a problem when trying to perform a callback to a Python function from a C extension. Specifically, the callback is being made by a pthread that seems to cause the problem. If I...
1
by: Stephen Kellett | last post by:
Hello everyone, I'm trying to do something in C calling Python and its failing. I'd be grateful if you could take a look and hopefully you have an answer. What I'm trying to do is determine...
4
by: Edwin Gomez | last post by:
I'm a C# developer and I'm new to Python. I would like to know if the concept of Asynchronous call-backs exists in Python. Basically what I mean is that I dispatch a thread and when the thread...
10
by: Finger.Octopus | last post by:
Hello, I have been trying to call the super constructor from my derived class but its not working as expected. See the code: class HTMLMain: def __init__(self): self.text = "<HTML><BODY>";...
0
varuns
by: varuns | last post by:
if i need to call a python function from c, i can use PyImport _Import() python-c API. Following code shows calling python function "add1" from python module "def1" int add(int x, int y) { ...
15
by: J. Peng | last post by:
Hello, I saw this statement in Core Python Programming book, All arguments of function calls are made by reference, meaning that any changes to these parameters within the function affect the...
16
by: Jaco Naude | last post by:
Hi there, This is my first post over here and I hope someone can give me some guidance. I'm trying to embed Python into a Visual C++ 2008 application and I'm getting linker problems. I've...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.