"Xah Lee" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
# note the line
# from <library_name> import <function_name1,function_name2...>
# it reads the library and import the function name
# to see available functions in a module one can use "dir"
# import urllib; print dir(urllib)

After about a month, this tutorial has finally reached the syntax of the 
"import" statement!

And word of advice to python beginners, "print dir(urllib)" is not very 
useful in the sense mentioned here (it prints all the names defined in the 
module with no explanations, and those names are not only functions, BTW). 
But "help(urllib)" is much more useful.  Even with such a simple script, 
this tutorial still managed to give some bad advice. 


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to