Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 260507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:21:14+00:00 2026-05-11T22:21:14+00:00

As a newbie to Python, and mainly having a background of writing scripts for

  • 0

As a “newbie” to Python, and mainly having a background of writing scripts for automating system administration related tasks, I don’t have a lot of sense for where to use certain tools.

But I am very interested in developing instincts on where to use specific tools/techniques.

I’ve seen a lot mentioned about templating engines, included zedshaw talking about using Jinja2 in Lamson

So I thought I would ask the community to provide me with some advice as to where/when I might know I should consider using a templating engine, such as Jinja2, Genshi, Mako, and co.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:21:14+00:00Added an answer on May 11, 2026 at 10:21 pm

    As @mikem says, templates help generating whatever form of output you like, in the right conditions. Essentially the first meaningful thing I ever wrote in Python was a templating system — YAPTU, for Yet Another Python Templating Utility — and that was 8+ years ago, before other good such systems existed… soon after I had the honor of having it enhanced by none less than Peter Norvig (see here), and now it sports almost 2,000 hits on search engines;-).

    Today’s templating engines are much better in many respects (though most are pretty specialized, especially to HTML output), but the fundamental idea remains — why bother with a lot of print statements and hard-coded strings in Python code, when it’s even easier to hve the strings out in editable template files? If you ever want (e.g.) to have the ability to output in French, English, or Italian (that was YAPTU’s original motivation during an intense weekend of hacking as I was getting acquainted with Python for the first time…!-), being able to just get your templates from the right directory (where the text is appropriately translated) will make everything SO much easier!!!

    Essentially, I think a templating system is more likely than not to be a good idea, whenever you’re outputting text-ish stuff. I’ve used YAPTU or adaptations thereof to smoothly switch between JSON, XML, and human-readable (HTML, actually) output, for example; a really good templating system, in this day and age, should in fact be able to transcend the “text-ish” limit and output in protobuf or other binary serialization format.

    Which templating system is best entirely depend on your specific situation — in your shoes, I’d study (and experiment with) a few of them, anyway. Some are designed for cases in which UI designers (who can’t program) should be editing them, others for programmer use only; many are specialized to HTML, some to XML, others more general; etc, etc. But SOME one of them (or your own Yet Another one!-) is sure to be better than a bunch of prints!-)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 121k
  • Answers 121k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can use AppDomain.GetAssemblies to see which are already loaded. May 12, 2026 at 12:34 am
  • Editorial Team
    Editorial Team added an answer I can give you a quick and bad solution: print… May 12, 2026 at 12:34 am
  • Editorial Team
    Editorial Team added an answer Hi I hope this will help you: http://en.wikibooks.org/wiki/X86_Assembly/Bootloaders http://en.wikipedia.org/wiki/Extended_boot_record "The… May 12, 2026 at 12:34 am

Related Questions

I am a newbie to Python and have come across the following example in
I've recently did some web design as a hobby with a primary motivation to
I'm relatively new to Python and am having problems programming with Scapy, the Python
I'm not new to Python but a complete newbie with regular expressions (on my

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.