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

Using Python in my programs

P: n/a
Hello. I am sorry if this has been asked before,
but I am new here.

If I recall correctly, Python can be used as a
scripting language for other programs, as if
the program had a builtin Python interpreter.
I wish to extend my programs by making them
scriptable with Python scripts.

Is this possible? If so, does anyone know where
I can find documentation on it? I searched the
python.org site and didnt find anything useful

Thanks

SH
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Assuming your program is written in C/C++, I would recommend that you start
with SWIG.

http://www.swig.org

You can play around with that as a start. If later you decided that SWIG is
not for you, you can always do it natively. There are plenty of
information at www.python.org.

"Squirrel Havoc" <squirrelhavoc(takeout)@(takeout)yahoo.com> wrote in
message news:Xn**********************************@151.164. 30.44...
Hello. I am sorry if this has been asked before,
but I am new here.

If I recall correctly, Python can be used as a
scripting language for other programs, as if
the program had a builtin Python interpreter.
I wish to extend my programs by making them
scriptable with Python scripts.

Is this possible? If so, does anyone know where
I can find documentation on it? I searched the
python.org site and didnt find anything useful

Thanks

SH

Jul 18 '05 #2

P: n/a
>>>>> "Squirrel" == Squirrel Havoc <sq***********@yahoo.com (takeout) (takeout)> writes:

Squirrel> Hello. I am sorry if this has been asked before, but I
Squirrel> am new here.

Welcome

Squirrel> If I recall correctly, Python can be used as a scripting
Squirrel> language for other programs, as if the program had a
Squirrel> builtin Python interpreter. I wish to extend my
Squirrel> programs by making them scriptable with Python scripts.

Squirrel> Is this possible? If so, does anyone know where I can
Squirrel> find documentation on it? I searched the python.org site
Squirrel> and didnt find anything useful

Google embedding python. First link is a good place to start --
http://docs.python.org/ext/ext.html -- the official docs for extending
and embedding python. Extending python is when you want to write or
wrap some library, typically C, C++ or FORTRAN, and expose its
functionality to python. Embedding python is when you want to use the
python interpreter in your own program. Start with the official docs
mentioned above, and then check out SWIG and boost::python.

JDH
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.