views:

90

answers:

2

A couple of days ago Bendin was kind enough to answer a question I had on how to handle some files that were uuencoded. When I described my response to his solution he went even further and showed me how to use a special function from the codecs module to better meet my needs.

import codecs
uudecode=codecs.getdecoder("uu")
decoded_Graphic,m=uudecode('mystring_that_I_need_decoded)

This was great and got me to the finish line. My problem is that I don't know how to do this on my own. I have slowly been trying to understand the help system so I went to the command line and typed

help(codecs)

I read what was there and while it looked important I could make no connections to the code that Bendin wrote. I then tried

help(codecs.getdecoder)

same problem

it looks to me that uudecode is a function that returns two values, one is a string that is the decoded file, the other is something else. Now I can figure out what that something else is because I can simply decode a file, look at the type and get the value (type-integer, value is 8809)

I had a thought as I was trying to work through this and did a

help(uudecode)

That was helpful so now I know that I can get help by calling help on something equal to the result of a function call (is that the right terminology) and get more explanation. But gosh this was a long road to this point.

I have almost every Python book and I use their indexes extensively but I still have not found the piece that I think is missing. Most of the book are written to a programming audience. But Python is so powerful and is some ways so intuitive that I think it should be installed on every desktop of anyone doing data organization and analysis for research. The problem is that there is not a manual that brings the higher level concepts to the reach of someone unschooled in the foundation that comes maybe from the weed out classes for a CS or similar degree.

So what is my question. Is there an intuitive clear explanation of the higher level things one needs to know to better understand Python and its help system? I am guessing it would be related to another language since I can't seem to find it in any of the Python books I have. I am not belaboring any of the books. They all have been helpful I just feel like something is missing and I don't have the time to take a CS curriculum and I don't want to learn C so I can better learn Python.

+1  A: 

I never use the help() function. I find it annoying to use. When I want to know more about something I browse or search the Python Library References. It offers you all the things you get with help() and much, much more. When the library reference fails, use Google (or Stack Overflow :-)

Sander Marechal
The library reference was also written for someone with a much more sophisticated background. It is helpful but I still feel like there is a missing piece I need to better understand what is written in the reference. I went to the reference after looking at Bendin's comment and I was lost.
PyNEwbie
+1  A: 

"Is there an intuitive clear explanation of the higher level things one needs to know to better understand Python and its help system?"

These are two separate things.

  1. For folks new to computing -- i.e., not professional programmers -- I tried to address this in http://homepage.mac.com/s_lott/books/nonprogrammer.html. The idea is to introduce someone to programming.

  2. The help command simply coughs out the documentation that's part of the Python source. It's often short-hand, and meant for people who already know Python. It's not a tutorial and was not meant to be a tutorial. Indeed, it can't be a tutorial because 80% of people only need a reference.

If you're looking for a good Python tutorial, start with this search: http://stackoverflow.com/search?q=[python]+tutorial

Specifically, the answers to http://stackoverflow.com/questions/3088/best-ways-to-teach-a-beginner-to-program might be helpful.

S.Lott