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 8459937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:28:02+00:00 2026-06-10T13:28:02+00:00

In PHP PHP can be the templating langauge. It seems to work well for

  • 0

In PHP PHP can be the templating langauge. It seems to work well for that with no need for a templating system/language.

But, I can’t find anything similar looking with Python for the language. How do you do things like:

I took this from another unrelated SO question:

<?php foreach( $dates as $year => $year_content  ): ?>
<h2><?php echo $year ?></h2>

<?php foreach( $year_content['months'] as $months ): ?>
<h3><?php echo $months->month ?> - <?php echo $months->sales ?></h3>
<?php endforeach; ?>

<?php endforeach; ?>

I just couldn’t find anything like this for “native” Python in the web view without someone’s framework. Thanks.

EDIT: No offense. Did not want a templating language.

EDIT: Despite the downvotes, a case in point is Python 3. While there is a five year expectancy to have 2.x users going to 3.x, not all templating languages support 3.x. Jinja, for example, has “expiremental” 3.x support. Why would I use that? I wouldn’t. That makes me dependent upon them, where I’d like to be able to use things native, but alas, it appears I cannot.

  • 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-06-10T13:28:03+00:00Added an answer on June 10, 2026 at 1:28 pm

    Python has no native templating in the sense that PHP has. You can use Python as an ISAPI extension, which would give you syntax like <% print "foo" %>. Alternatively, you can write python scripts in pure CGI. Those roads are probably quite painful, and you’ll be better served using frameworks – frameworks give you the advantage of other developers’ experience as well as smoothing out the rough edges of dealing directly with CGI and HTTP.

    Please see my answer to a similar question asked earlier.

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

Sidebar

Related Questions

Situation: A PHP Templating system that is responsible for building a pages HTML. Javascript
I was wondering if PHP can do this as there seems to be no
I was looking at templating systems for php, and I've come to believe that
I have a little Templating class, that keeps all settings inside the php class.
I've read a couple of Related questions by the site, but can't find what
I'm searching for a very basic PHP templating system. Right now I'm using: /**
I'm writing a simple templating layer in PHP but I've got myself a little
I want to understand how to use templating system and permalinks on php websites
I'm looking for a language sort of like PHP, but more brief -- I'm
Why should I use templating system in PHP? The reasoning behind my question is:

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.