Jump to content
  • Advertisement
Sign in to follow this  
Random Noobie

Is Python used for C++?

This topic is 4289 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
uh depends on how you mean that.

python is a scripting language.
C++ is a computer language.

but some people do embed a python interpreter into c++

Share this post


Link to post
Share on other sites
yeah, there are some games that use python as a scripting language for the game. So it is 100% possible to use python and C++ together. I used to know an example of a game that did this but I forgot.


Is that what you meant?

Chad.

Share this post


Link to post
Share on other sites
Quote:
Original post by slymr
python is a scripting language.
C++ is a computer language.


?

Last time I checked, python ran on computers too :)

Share this post


Link to post
Share on other sites
Quote:
Quote:
Original post by slymr
python is a scripting language.
C++ is a computer language.



?

Last time I checked, python ran on computers too :)


i think he meant that c++ is a systems programming language :->

Share this post


Link to post
Share on other sites
I believe he meant
Python is a scripting language.
C++ is a programming language.


Although, you can make programs using nothing but Python.

However, in most applications of python I've seen that are non-web related it's usually as a sub-language running under a C++ program.

Web related I usually see it by itself used to build a Content Management System.

I haven't messed around with Python in a while though so things may be different now...

( I also forgot to mention that there's an entire game engine written entirely in Python. I forget its name though)

Share this post


Link to post
Share on other sites
Quote:
Original post by Ceoddyn
Pygame


pygame isn't written entierly in python,
its written mainly in C and is a python module. (its using SDL aswell).

python can use native modules (generally written in C or C++)
native applications can use python (Civilazations 4 is one example)

Share this post


Link to post
Share on other sites
Uh, I'm having a lot of difficulty guessing what you mean by "used for C++". C++ is a tool used for accomplishing things, not a thing to be accomplished. Unless perhaps you meant "used to generate C++ source code"? It can be, but you have to know both languages already to make it work at all, and be pretty good with C++ to make it *useful*. :)

Share this post


Link to post
Share on other sites
Quote:
Original post by caldiar
I believe he meant
Python is a scripting language.
C++ is a programming language.


Last time I checked, you could program with Python.

Prehaps we all mean "C++ is a compiled language."?

@OP - Since your original question was rather vague, I'll just say something on the topic of Python and C++. Recently, I've been adding Python to my C++ game as a scripting language. It's been difficult, but definately doable. It seems to be working fine now and I started embedding it about two weeks ago, IIRC. It's quite nice being able to write a script and forced me to provide a nice abstraction layer between my Entity class and the game logic.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!