Archived

This topic is now archived and is closed to further replies.

petewood

Changing Python prototypes into C++ code.

Recommended Posts

I was wondering whether anyone here has experience of prototyping software in Python and then implementing parts in C++ until they had a fully C++ app. Or maybe you found it was better to leave some parts as Python because the potential performance gain wasn't worth the effort of repeating the work in C++. I don't really want this to degrade into some language war or optimisation war or some other ThisThingIsBetterThanThatThing. I'd like people to contribute if they have success stories and can maybe explain how it was successful (or even unsuccessful attempts and why they failed). I don't need to be persuaded about the merits of other languages but if you wish to discuss them I'd be happy to join you in a separate thread. In my work I have been using Python for a few months just for code which helps me test other code. I have felt so liberated by the speed with which I can make changes and see the effects, the speed with which I can put my ideas into practice and the flexibility of the code. I'm thinking of changing to using Python to write new code intended for eventual production and migrating it as the design becomes better factored. It may also be that I can persuade my employers that having a Python interpreter running inside our software is a good thing during development and could have the additional benefit of giving our applications more value as an end product. Thanks for any contributions. Pete [edited by - petewood on October 31, 2003 7:15:49 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I''ve worked with Python/C++ combo for a month or so and there''s no turning back for me. I write software in Python, profile it and convert the slow parts of the code to C++.

Because of the 20/80 rule the amount of code that needs to be rewritten with C++ isn''t that big. I am more than willing to pay some performance for the added flexibility.

The benefits for me are especially great as I''m using the extreme programming methodology (more or less), so the need for rewriting and restructuring is great.

Share this post


Link to post
Share on other sites
Wow, someone actually got back to me - I originally posted this in March!

The situation at the moment is that our company has decided to go with Python as the macro/scripting language for our products. I''m just coming to the end of developing the OpenGL Network Visualisation code and getting it to print to PostScript nicely. My next project will be integrating the Python interpreter, providing interface classes for the application and writing supporting Python libraries.

I love my job!

[Edited by - petewood on November 15, 2004 4:30:43 AM]

Share this post


Link to post
Share on other sites