By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

Calling python scripts from C# programs

P: n/a
Hi All,

I want to call (execute) some python scripts from my C# program. I know
that this can be done but have not idea how. The other option that I
can think of is developing python web services and then calling them
from from C# program. I just wanted to know what is the best option and
how it can be achieved. In the end all I want is to trigger some python
scripts from my C# code. The is NO remote execution involved here
therefore I am not too keen on web services.

I am very new to python. Now lets see what the geeks have to say about
this :).

Thanks,

Soumitra

Sep 22 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
so*************@gmail.com wrote:
I want to call (execute) some python scripts from my C# program.


See http://www.zope.org/Members/Brian/PythonNet.
--
Benji York

Sep 22 '05 #2

P: n/a
You should also be aware of IronPython, although it is not suitable for
production use due to its reliance on a beta version of the .NET
runtime. In some future time, IronPython will probably be the cleanest
and simplest way to integrate Python with existing .NET code.

http://www.ironpython.com/

Sep 22 '05 #3

P: n/a
Another option is to implement the needed python code in COM server and
call that from C#. A simple example of python COM server can be seen
about halfway down the page here
http://www.oreilly.com/catalog/pytho...pter/ch12.html

Sep 22 '05 #4

P: n/a
David Wilson wrote:
http://www.ironpython.com/


It should be noted that they (?) don't seem to update that site
anymore, you can find 0.9.1 here:
http://workspaces.gotdotnet.com/ironpython

There is also Boo, which is Python-like (with some differences) but is
a .NET Language itself. I never understood if IronPython was ment to
be fully Python compatible, so I don't know if Boo is the same or
further from what you may want... anyways,
http://boo.codehaus.org/

Sep 22 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.