~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to pypy/module/__builtin__/app_help.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""
 
2
Plain Python definition of the builtin interactive help functions.
 
3
"""
 
4
 
 
5
import sys
 
6
 
 
7
if sys.platform == "win32":
 
8
    exit = "Use Ctrl-Z plus Return to exit."
 
9
else:
 
10
    exit = "Use Ctrl-D (i.e. EOF) to exit."
 
11
 
 
12
def copyright():
 
13
    print 'Copyright 2003-2007 PyPy development team.\nAll rights reserved.\nFor further information see http://www.codespeak.net/pypy.\nSome materials may have a different copyright.\nIn these cases, this is explicitly noted in the source code file.'
 
14
 
 
15
def license():
 
16
    print \
 
17
"""
 
18
Copyright (c) <2003-2007> <PyPy development team>
 
19
 
 
20
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
 
21
 
 
22
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 
23
 
 
24
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
25
"""
 
26
 
 
27
 
 
28
# Define the built-in 'help'.
 
29
# This is a wrapper around pydoc.help (with a twist).
 
30
 
 
31
class _Helper:
 
32
    def __repr__(self):
 
33
        return "Type help() for interactive help, " \
 
34
               "or help(object) for help about object."
 
35
    def __call__(self, *args, **kwds):
 
36
        import pydoc
 
37
        return pydoc.help(*args, **kwds)
 
38
 
 
39
help = _Helper()