On Apr 20, 2:57 pm, "dug.armad...@googlemail.com" <dug.armad...@googlemail.com> wrote: > Hi, > > Say you set out to program in Python knowing that you will be > converting parts of it into C ( or maybe C++) at a later date, but you > do not know which parts. > > Can you give any general Python structure / syntax advice that if > implemented from the start, will make this future task less painful. > In addition, advice that will make this easier for automatic tools > will be good too. > > This advice might include stuff like "avoid using Python yield > as ...." > > Thank you in advance, > > Douglas
Actually you can have your cake and eat it too. We've used the SIMPL toolkit (http://www.icanprogram.com/simpl) and its ultra lightweight toolkit to join Python programs to those written in other languages (C,C++,Tcl/Tk or JAVA). That way you can keep the parts that Python is good at in Python and keep the parts that C or C++ are good at written in those languages and join the lot together seamlessly. SIMPL will even allow those parts to be deployed on separate network nodes often without any code change or recompile. There is an onlime tutorial/course with lots of examples at: http://www.icanprogram.com/06py/main.html bob -- http://mail.python.org/mailman/listinfo/python-list