Tag Archives: python

The Best Programming Languages

Five of the Best Programming Languages and Frameworks for a Small Business

Choosing a programming framework for a small business can be overwhelming- there are so many. Here are a few of the best choices, to help you get started.

Ask a room of ten developers which programming framework is the ‘best on the market,’ and you’re liable to receive ten different answers. Each developer will sing the praises of a different language, and each one will very probably feel that theirs is the only logical choice. The most confusing thing, though? Each and every one of those developers will be correct.

Continue reading The Best Programming Languages

Handle Error in Python with try except

for i in range(20):
  try:
    something here
  except IOError:
    pass

 When python finds error in the code, it will stop and escape the loop and it might be a nightmare for us, so making an exception handler is a smart choice.

The above code is the simplest usage of try… except function, it means that, from the range(20) we will do ‘something here’, but if there are errors, here for example the error IOError is the error of not finding the object, thanks to try except, python in this case will process the ‘pass’ (forget the error and continue). So the loop is safe and can be continued.

Pygal – another fun way to create chart with Python

pygal 1.4.2 is a dynamic SVG charting library.

Python is a powerful and fun-to-play-with-but-also-serious programming language. Recently I discover a package that help us create some beautiful charts, so besides the default matplotlib, sometimes we can switch to this one and play with it (or also be serious and use it for your research). Here is the homepage of the package

Image: