TurboGears Interview Questions & Answers

    1. Question 1. What Is Turbogears?Answer :

      TurboGears is a rapid development “front-to_back” web meta-framework. Its aim is to simplify and speed up the development of modern web applications written in the Python programming language.

 

    1. Question 2. How Is Turbogears Licensed? Can I Use It For Commercial Applications?Answer :

      TurboGears itself is licensed under the MIT license. Its different parts may be licensed differently. Please read the details on the license page.

      In general, all licenses allow commercial usage and even closed-source distribution of your application if you include a copy of the resp. license, but if in doubt, please consult your lawyer.

 

Python Interview Questions

    1. Question 3. How Does Turbogears Compare To Ruby On Rails/django/pylons/etc.? Which Framework Should I Choose For My New Project?Answer :

      This is an ever popular topic on the mailing list. See,

      for example, these threads:

      • TurboGears vs Django (older) (2006-07-29)
      • TurboGears vs JSP vs PHP vs Ruby on Rails vs Webware (2006-08-15)
      • Who are the core TurboGears developers (2006-11-14)
      • Sharing between TurboGears/Django/Pylons/etc. (2006-12_02)
      • TurboGears vs Django (2006-12-05)

 

 

    1. Question 4. What Books Are Available For Learning Turbogears?Answer :

      The “official” TurboGears book is Rapid Web Applications with TurboGears by Mark Ramm et al.

 

Python Tutorial

    1. Question 5. When Can We Expect Python 2.5 Support?Answer :

      TurboGears supports Python 2.5 as of version 1.0.2.

 

MVC Framework Interview Questions

    1. Question 6. When Can We Expect Python 2.6 Support?Answer :

      TurboGears officially supports Python 2.6 as of version 1.1.

 

 

    1. Question 7. How Can I Do Non-root Installations?how Can I Install Turbogears On A Unix-like System Without Root User Privileges?Answer :

      An easy and quick way is to use the virtualenv program to create a separate, clean Python environment and install TurboGears in this environment. The basic steps are:

      1. install virtualenv with easy_install virtualenv.
      2. Run virtualenv
      3. source /bin/activate
      4. Download tgsetup.py and run python tgsetup.py.
      5. Install additional eggs, like nose, pysqlite, SQLObject, SQLAlchemy, etc. with easy_install

      is the name of a directory that virtualenv should create. It will contain the new Python environment. Everytime you want to work with this environment, you need to carry out step 3. from above, so that the library modules and scripts from the environment are used.

 

MVC Framework Tutorial
Microsoft Entity Framework Interview Questions

    1. Question 8. Why Do I Get The Log Messages Twice?Answer :

      This is normal. The TurboGears application server, Cherrypy 2.x, runs two processes when in development mode and it’s set to autoreload. Each process outputs logging messages and that is why they appear twice. This does not happen in production mode and also doesn’t happen in newer (i.e. CP3) CherryPy versions (which TurboGears does not use yet), which involved a rewrite of the reloading mechanism.

 

 

  1. Question 9. What Causes “‘stream’ Object Has No Attribute ‘tag'”?Answer :

    This is most probably caused by mixing Genshi and ToscaWidgets incorrectly.

    In the beginning, there was Kid and “traditional” widgets. Traditional widgets returned an ElementTree object, which the Kid engine converted into HTML. In Genshi, you can use traditional widgets, but you must use the “ET()” function to explicitly convert them to HTML.