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

Python Flask Basics Welcome to Flask First Steps

Tobias Edwards
Tobias Edwards
14,458 Points

Using flask on Python IDLE

How would I follow along with this series using Python IDLE?

2 Answers

Eric Hodgins
Eric Hodgins
29,207 Points

The way I ran it in a browser if you're not using workspaces is by doing this:

  1. Run "python simpleApp.py" in the terminal
  2. Type this as the url "http://localhost:8000"

If you want other devices on your network to view the webpage try this as the url: You'll need to know the local ip address of the computer running simpleApp.py. http://"ip address":8000

Hopefully that helps someone out.

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

You should be able to follow along using IDLE if you want, you'll just need to make sure that the required packages are installed. For the Flask course, that should just be the flask package, which you'll install with pip install flask.

Tobias Edwards
Tobias Edwards
14,458 Points

I was doing that, but how could I could I open up the webpages as you do in workspaces in Python IDLE? Thanks

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Writing the code should be exactly the same. Write it in IDLE's text editor. Actually, the running part should be fine in IDLE, too, except if you're using a virtualenv. I'm not sure how well IDLE plays with that.

Can you use a terminal program for the running and virtualenv, if you're using one, and IDLE as the editor?