473,406 Members | 2,377 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,406 software developers and data experts.

Using Python in my programs

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
2 1402
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
>>>>> "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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Catalin | last post by:
How can I make executables with python? I found some utilities that claim they can do something like that like Installer and py2exe but they actualy pack the code in a huge arhive! This solves the...
1
by: Rami A. Kishek | last post by:
Please help! Very strange installation problem. First, let me say I successfully installed and use Python 2.2.3 and 2.3 from the EXE binaries on a win ME machine. That machine previously had...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
28
by: Maboroshi | last post by:
Hi I am fairly new to programming but not as such that I am a total beginner From what I understand C and C++ are faster languages than Python. Is this because of Pythons ability to operate on...
47
by: Michael Scarlett | last post by:
There is an amazing article by paul graham about python, and an even better discussion about it on slashdot. The reason I point this out, is the more I read both articles, the more I realised how...
114
by: Maurice LING | last post by:
This may be a dumb thing to ask, but besides the penalty for dynamic typing, is there any other real reasons that Python is slower than Java? maurice
8
by: Joakim Persson | last post by:
Hello all. I am involved in a project where we have a desire to improve our software testing tools, and I'm in charge of looking for solutions regarding the logging of our software (originating...
0
by: Fuzzyman | last post by:
It's finally happened, `Movable Python <http://www.voidspace.org.uk/python/movpy/>`_ is finally released. Versions for Python 2.3 & 2.4 are available from `The Movable Python Shop...
31
by: Mark Dufour | last post by:
Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.