Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Quicken Loans
12,654 PointsIntegrating Python with HTML for a web app
I am looking for information on using python and front end code together. An example would be for a simple web app such as a calculator, hangman game, etc. that has a front end UI and uses python for its logic.
Theres a LOT of pages out there from the official python documentation to youtube tutorials, but I'm having trouble getting a handle on it. Some sites say python cgi is the way to go, while others say python-mod for xampp is better.
Just looking for some clarity on this and any info would be appreciated. Thanks!
2 Answers

Ricky Catron
13,023 PointsI would say use the Python web framework Flask. It is quick, simple, and taught here!
I started with it a little while ago and I love it. The simplicity of python with the power of the web. There are lots of plugins if you need them but its light and easy if you don't. Highly recommended.
Goodluck! --Ricky

Kenneth Love
Treehouse Guest TeacherFlask or Django are both great options. Anyone telling you to use Python as CGI or Apache's mod_python is way outdated. Generally, most people deploy Python now with something like gunicorn
or uWSGI
and then a reverse proxy like nginx or Apache's mod_wsgi.
We don't cover deployment (yet) but using the terms above, I'm sure you can find good resources.

Ricky Catron
13,023 PointsWhen will deployment coming out?

Kenneth Love
Treehouse Guest TeacherNo clue. After another Flask course or two and a few Django courses, at the earliest.

Ricky Catron
13,023 PointsAwesome! I am loving Flask right now! This is my site/portfolio I am building with it right now. Keep up the good work!
--Ricky

fredrikliden
8,720 Points+1 for deployment video! :)