On 9 January 2013 10:37, Nick Heppleston nick@modhul.com wrote:
I've started to use Python almost exclusively for all development over the last year or so on both Linux and Windows environments, including TCP daemon style apps.
That's good to hear - it sounds like you've been where I am but have already done the research and I can just blindly copy your path :-)
I recently needed to write reasonably complex TCP server and after trying PHP - which is realistically about as close to C that I want to get - I went back to Python, it just feels like a more natural language. Python comes with a decent Socket Server and can be daemonized relatively easily.
I have done a lot with PHP over the last few years and in many cases it's an ideal tool for the job, but I've developed a tendency to shoehorn other jobs into PHP tasks because I have the libraries already ready to go. PHP can be used for scripts etc but Python is, I believe anyway, much better suited.
As for how to catch those errors and bugs, I'm sure I'm teaching you how to suck eggs, but.... try...catch (or its equivalent) is your friend :-)
For some reason I've never really used exception handling in anger, so to that extent any egg sucking lessons are welcome. But I do at least know what you mean by it! (PS: I therefore take back my previous comment about being a competant programmer. What's wrong with GOTO anyway?)