CS 1110 Lecture 6: 9.8.15 -- Lesson 6 -- Call Frames and Calling web-pages

22 views1 pages

Document Summary

9/8/15 -- lesson 6 -- call frames and calling web-pages. Every module can be treated as a script. When running as a script, you need to write something of the form: the_name_of_the_file. py. When using a module, you can import it without using . py. In order to use webpages as types in python, you need to import the module named urllib2. In order to call a web page, use the following call: urllib2. urlopen("http://www. cornell. edu") You can convert the webpage into a string by using the following: s = page. read() Local variables are limited in scope to the function in which they are called. Global variables are not limited to certain functions.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents