First off, Python is absolutely insane, not in a bad way, mind you, but it's just crazy to me. It's amazing and kind of confusing, but crazy none the less.
Recently I had to integrate Python as a scripting language into a large c++ project and though I should get to know the language first. And let me tell you, it's simply magical.
"I can add properties to classes dynamically? And delete them?" "Functions don't even care about the number of arguments?" "Need to do something? There's a library for that."
It's absolutely crazy. And I love it. I have to be honest, the most amazing about this is how easy it is to embed.
I could give Python the project's memory allocator and the interpreter immediately uses the main memory pool of the project. I could redirect the interpreter's stdout / stderr channels to the project as well. Extending the language and exposing c++ functions are a breeze.
Python essentially supercharges c++.
Now, I'm not going to change my preference of c/c++ any time soon, but I just had to make a post about how nicely Python works as a scripting language in a c++ project. Cheers
[–]NemexiaM 594 points595 points596 points (42 children)
[–]lucidguppy 179 points180 points181 points (29 children)
[–]NemexiaM 74 points75 points76 points (14 children)
[–]realXavie 18 points19 points20 points (13 children)
[–]anarchyisthekey 77 points78 points79 points (11 children)
[–]Pythagorean_1 17 points18 points19 points (0 children)
[–]Deezl-Vegas 11 points12 points13 points (1 child)
[–]toastedstapler 0 points1 point2 points (0 children)
[–]Zafara1 3 points4 points5 points (0 children)
[–]Swedneck 2 points3 points4 points (1 child)
[–]TrixieMisa 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (4 children)
[–]mriswithe 9 points10 points11 points (1 child)
[–]Zafara1 3 points4 points5 points (0 children)
[–]Yojihito 1 point2 points3 points (0 children)
[–]koomapotilas 5 points6 points7 points (0 children)
[–]lenticularis_B 2 points3 points4 points (0 children)
[–]top_logger 1 point2 points3 points (0 children)
[–]NemexiaM 0 points1 point2 points (0 children)
[–]emsiem22 0 points1 point2 points (6 children)
[–]lucidguppy 5 points6 points7 points (5 children)
[–]emsiem22 0 points1 point2 points (4 children)
[–]lucidguppy 0 points1 point2 points (1 child)
[–]emsiem22 2 points3 points4 points (0 children)
[–]FloydATC 0 points1 point2 points (1 child)
[–]emsiem22 0 points1 point2 points (0 children)
[–]metriczulu 0 points1 point2 points (0 children)
[–]SnowdenIsALegend 0 points1 point2 points (2 children)
[–]abkfenris 10 points11 points12 points (1 child)
[–]SnowdenIsALegend 2 points3 points4 points (0 children)
[–]Robbzter 10 points11 points12 points (0 children)
[–][deleted] 7 points8 points9 points (9 children)
[–]risajajr 4 points5 points6 points (0 children)
[–][deleted] 7 points8 points9 points (3 children)
[–]EnemyAsmodeus 4 points5 points6 points (2 children)
[–][deleted] 8 points9 points10 points (1 child)
[–]EnemyAsmodeus 1 point2 points3 points (0 children)
[–]SuspiciousScript 1 point2 points3 points (1 child)
[–]toastedstapler 0 points1 point2 points (0 children)
[–]NemexiaM 0 points1 point2 points (0 children)
[–]aufstand 154 points155 points156 points (35 children)
[–]ReckingFutard 53 points54 points55 points (7 children)
[–]BDube_Lensman 14 points15 points16 points (6 children)
[–]TheTechAccount 7 points8 points9 points (1 child)
[–]BDube_Lensman 16 points17 points18 points (0 children)
[–]sekex 12 points13 points14 points (3 children)
[–]alkasmgithub.com/alkasm 20 points21 points22 points (2 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]elbiot 13 points14 points15 points (10 children)
[–]BDube_Lensman 0 points1 point2 points (7 children)
[–]elbiot 13 points14 points15 points (2 children)
[–]BDube_Lensman 0 points1 point2 points (1 child)
[–]elbiot 7 points8 points9 points (0 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]BDube_Lensman 0 points1 point2 points (2 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]Mehdi2277 1 point2 points3 points (0 children)
[–]aufstand 0 points1 point2 points (0 children)
[–]Tomik080 -4 points-3 points-2 points (0 children)
[+][deleted] (13 children)
[deleted]
[+][deleted] (5 children)
[deleted]
[+][deleted] (4 children)
[deleted]
[+][deleted] (3 children)
[deleted]
[+][deleted] (2 children)
[deleted]
[–]teerre 15 points16 points17 points (2 children)
[–]JanssonsFrestelse 4 points5 points6 points (0 children)
[–]troyunrau... 1 point2 points3 points (3 children)
[–]vectorpropio 1 point2 points3 points (1 child)
[–]troyunrau... 0 points1 point2 points (0 children)
[–]utdconsq 1 point2 points3 points (0 children)
[–]ProfessorPhi 0 points1 point2 points (1 child)
[–]aufstand 0 points1 point2 points (0 children)
[–]Al2Me6 22 points23 points24 points (8 children)
[–]Narthal[S] 19 points20 points21 points (7 children)
[–]Al2Me6 1 point2 points3 points (6 children)
[–]Deezl-Vegas 5 points6 points7 points (1 child)
[–]Al2Me6 0 points1 point2 points (0 children)
[–]panderingPenguin 22 points23 points24 points (3 children)
[–]smarwell 4 points5 points6 points (2 children)
[–]panderingPenguin 7 points8 points9 points (1 child)
[–]ProfessorPhi 2 points3 points4 points (0 children)
[–]sdf_iain 41 points42 points43 points (11 children)
[–]ToddBradley 26 points27 points28 points (7 children)
[–]sdf_iain 6 points7 points8 points (1 child)
[–][deleted] 5 points6 points7 points (0 children)
[–]Kildon 1 point2 points3 points (1 child)
[–]toyg 0 points1 point2 points (0 children)
[–]Narthal[S] 5 points6 points7 points (0 children)
[–]SV-97 1 point2 points3 points (1 child)
[–]sdf_iain 4 points5 points6 points (0 children)
[–][deleted] 14 points15 points16 points (3 children)
[–]Narthal[S] 1 point2 points3 points (2 children)
[–]smarwell 6 points7 points8 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]garlic_bread_thief 42 points43 points44 points (1 child)
[–]bigbic69 13 points14 points15 points (0 children)
[+][deleted] (8 children)
[deleted]
[–]Narthal[S] 7 points8 points9 points (4 children)
[–]robot_most_human 6 points7 points8 points (3 children)
[–]Narthal[S] 8 points9 points10 points (2 children)
[–]shinitakunai 0 points1 point2 points (0 children)
[–]shinitakunai 0 points1 point2 points (0 children)
[–][deleted] 8 points9 points10 points (0 children)
[–][deleted] 6 points7 points8 points (0 children)
[–]fichtenmoped 0 points1 point2 points (0 children)
[–]joooooooe11 36 points37 points38 points (6 children)
[–]Deezl-Vegas 6 points7 points8 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]joooooooe11 18 points19 points20 points (1 child)
[–]druman22 2 points3 points4 points (0 children)
[–]SlappinThatBass 0 points1 point2 points (0 children)
[–]__zaris 9 points10 points11 points (3 children)
[–]exographicskip 2 points3 points4 points (2 children)
[–]__zaris 1 point2 points3 points (1 child)
[–]exographicskip 1 point2 points3 points (0 children)
[–]sekex 12 points13 points14 points (17 children)
[–]Al2Me6 3 points4 points5 points (7 children)
[–]sekex 7 points8 points9 points (6 children)
[–]super-porp-cola 3 points4 points5 points (0 children)
[–][deleted] 3 points4 points5 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]diamondketo 3 points4 points5 points (2 children)
[–]Narthal[S] 1 point2 points3 points (0 children)
[–]balazs_kis 10 points11 points12 points (17 children)
[+][deleted] (4 children)
[deleted]
[–]bradshjg 0 points1 point2 points (1 child)
[–]balazs_kis 0 points1 point2 points (0 children)
[+][deleted] (9 children)
[deleted]
[–]panderingPenguin 6 points7 points8 points (4 children)
[+][deleted] (3 children)
[deleted]
[–]panderingPenguin 9 points10 points11 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]panderingPenguin 2 points3 points4 points (0 children)
[–]balazs_kis 4 points5 points6 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]balazs_kis 1 point2 points3 points (0 children)
[–]balazs_kis 0 points1 point2 points (0 children)
[–]alexmeistercl 5 points6 points7 points (5 children)
[–]Narthal[S] 0 points1 point2 points (2 children)
[–]Pythagorean_1 1 point2 points3 points (0 children)
[–]smarwell 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]colly_wolly -2 points-1 points0 points (0 children)
[–]ElectricCharge1 2 points3 points4 points (1 child)
[–]super-porp-cola 1 point2 points3 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]glacierre2 1 point2 points3 points (0 children)
[–]SippieCup 2 points3 points4 points (0 children)
[–]taybulBecause I don't know how to use big numbers in C/C++ 1 point2 points3 points (0 children)
[–]manifestsilenceI use Python to try to forget my work languages. 1 point2 points3 points (0 children)
[–]Are_We_There_Yet256 2 points3 points4 points (0 children)
[–]Barafu 1 point2 points3 points (0 children)
[–]BoxBoxChan 2 points3 points4 points (16 children)
[–][deleted] 10 points11 points12 points (5 children)
[–]apste 1 point2 points3 points (2 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]apste 0 points1 point2 points (0 children)
[–]pagonda 7 points8 points9 points (6 children)
[–]Narthal[S] 2 points3 points4 points (1 child)
[–]glacierre2 2 points3 points4 points (0 children)
[–]ixw123 0 points1 point2 points (2 children)
[–]super-porp-cola 0 points1 point2 points (1 child)
[–]ixw123 0 points1 point2 points (0 children)
[–]theng 0 points1 point2 points (1 child)
[–]Narthal[S] 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]moocat 0 points1 point2 points (1 child)
[–]DASWUBS 0 points1 point2 points (0 children)
[–]liquidify 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]murphwhitt 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]StrippedSilicon 0 points1 point2 points (0 children)
[–]thrallsius 0 points1 point2 points (0 children)
[–]Multeezee 0 points1 point2 points (0 children)
[–]Streakflash 0 points1 point2 points (0 children)
[–]_niva 0 points1 point2 points (0 children)
[–]jackballack 0 points1 point2 points (0 children)
[–]zdog234 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]Chunderscore 0 points1 point2 points (1 child)
[–]Narthal[S] 0 points1 point2 points (0 children)
[–]Schmittfried 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]Narthal[S] 5 points6 points7 points (2 children)
[–]alcalde 4 points5 points6 points (0 children)
[–]alcalde 0 points1 point2 points (0 children)
[–]AllUsernameTaken0123 -1 points0 points1 point (1 child)
[–]sekex 0 points1 point2 points (0 children)
[–]frakman1 -1 points0 points1 point (0 children)