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 trialTobias Edwards
14,458 PointsUsing flask on Python IDLE
How would I follow along with this series using Python IDLE?
2 Answers
Eric Hodgins
29,207 PointsThe way I ran it in a browser if you're not using workspaces is by doing this:
- Run "python simpleApp.py" in the terminal
- 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
Treehouse Guest TeacherYou 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
14,458 PointsI was doing that, but how could I could I open up the webpages as you do in workspaces in Python IDLE? Thanks
Kenneth Love
Treehouse Guest TeacherWriting 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?