Thread: Starting Python
View Single Post
Join Date: Oct 2004
Posts: 4,137
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 946
Moderator
vegaseat's Avatar
vegaseat vegaseat is offline Offline
DaniWeb's Hypocrite

Re: Starting Python

 
0
  #5
Mar 23rd, 2005
Python has a very helpful feature called help(). Here is a sample ...
  1. # list all the modules Python currently knows about ...
  2. help("modules")
  3.  
  4. # now pick a module from that list you want to know
  5. # more about ...
  6.  
  7. # to get help about module calendar ...
  8. help("calendar")
  9.  
  10. # dito for the math module
  11. help("math")
  12.  
  13. # file stuff ...
  14. help("file")
  15.  
  16. # down to method/function level ...
  17. help("os.read")
That means you can use help in the program code, or at the interactive page >>> prompt. Not many other languages offer this handiness!

If you want other people to read and help with your code, you might want to follow the Python style guide, written by GVR himself:
http://www.python.org/peps/pep-0008.html
Last edited by vegaseat; Jun 5th, 2007 at 1:43 pm. Reason: code tags updated
May 'the Google' be with you!
Reply With Quote