Sign in to follow this  

Is Python used for C++?

This topic is 4071 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

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:
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
Quote:
Original post by Ezbez
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.



"Although, you can make programs using nothing but Python. "
I take it the rest of my post wasn't read. =(

Share this post


Link to post
Share on other sites
Quote:
Original post by caldiar
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.


In my code, it's the other way around. Python drives the application, and control a pair of native modules, one in C++, one in Fortran.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fruny
Quote:
Original post by caldiar
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.


In my code, it's the other way around. Python drives the application, and control a pair of native modules, one in C++, one in Fortran.

Well dat cuz you crazy [embarrass]

Share this post


Link to post
Share on other sites
The bulk of EVE-Online is written using Stackless Python, with just a few high-performance modules on the client and server side written in C++.

Share this post


Link to post
Share on other sites

This topic is 4071 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this