[Pythonmac-SIG] Mac User Python Newbies

Louis Pecora pecora at anvil.nrl.navy.mil
Mon Feb 14 18:37:15 CET 2005


Michael Hudson wrote:

>Well, I think this is a subjective judgement -- a matter of
>familiarity.  I "play" with Python all the time.  A good start is to
>enhance your interactive experience somewhat.  Three options spring to
>mind:
>
> 1) Get readline support working.  If you're still using Apple's
>    Python, get bbum's readline.so from
>
>        http://homepage.mac.com/bbum/BumFiles/FileSharing27.html
>
>    (is this still the right link?), then add lines like
>
>        try:
>            import rlcompleter, readline
>            readline.parse_and_bind("tab: complete")
>        except ImportError:
>            pass
>
>    to a file called something link ~/.pythonrc and point the
>    PYTHONSTARTUP environment variable to it (yikes, this is a bit
>    involved...).  Then if you want to see what functions a module
>    supports you can do:
>
>        >>> import urllib2
>        >>> urllib2.url<HERE I HIT TAB>
>        urllib2.url2pathname  urllib2.urlopen       urllib2.urlparse
>
>    and so on:
>
>       >>> data = urllib2.urlopen('http://www.google.com').read()
>        >>> data[:10]
>        '<html><hea'
>
> 2) Install IPython (http://ipython.scipy.org/).  This is a massive
>    extension of the above and requires you have readline working.
>    I've not used it much, but people like it.  I imagine it has docs
>    :)
>
> 3) Install (my) PyRepl package (http://codespeak.net/pyrpl/), which
>    is a different implementation of the same kind of thing.
>
>There are less terminal oriented interactive environments too -- I
>think wxPython includes one and PyObjC has a 'PyInterpreter' example.
>But to me they don't hold much advantage over the in-Terminal.app
>solutions.
>

Well, I can just see Troy sitting at his computer reading the above and 
saying, "I rest my case."  :-)

You did somewhat admit that in (1) above and in the remainder of your 
message so you are honest about the state of affairs.  And I thank you 
for all the information.  Now, where to start?  Where to start?

-- 
Cheers,

Lou Pecora

Code 6362
Naval Research Lab
Washington, DC  20375
USA
Ph:  +202-767-6002
email:  pecora at anvil.nrl.navy.mil



More information about the Pythonmac-SIG mailing list