2021-01-07 14:00:57 +03:00
|
|
|
'''
|
|
|
|
Implements the interactive help() command.
|
|
|
|
'''
|
|
|
|
from kuroko import version
|
|
|
|
|
|
|
|
let __introText = ('''\
|
|
|
|
Kuroko {version}
|
|
|
|
|
|
|
|
Kuroko is a bytecode-compiled, duck-typed language with familiar indentation-
|
|
|
|
driven block syntax. This documentation is incomplete. For more information,
|
|
|
|
please consult the README or website (https://github.com/klange/kuroko).
|
|
|
|
|
|
|
|
To leave the REPL, type `exit()` or press Ctrl-D on a blank line.
|
|
|
|
|
|
|
|
The REPL will automatically indent blocks when a line ends with a `:`. To turn
|
|
|
|
this functionality off, type `paste()`. Tab completion of global variable names
|
|
|
|
and attribute field names is available.
|
|
|
|
'''.format(version=version))
|
|
|
|
|
|
|
|
def interactive():
|
|
|
|
'''Runs the detailed help tool. Currently that means just printing a longer help string.'''
|
|
|
|
print(__introText)
|
2021-01-19 16:27:05 +03:00
|
|
|
|
2021-02-05 11:21:57 +03:00
|
|
|
def simple(obj):
|
|
|
|
try:
|
|
|
|
print(obj.__doc__)
|
|
|
|
except:
|
|
|
|
try:
|
|
|
|
print(obj.__class__.__doc__)
|
|
|
|
except:
|
|
|
|
print('No docstring avaialble for', obj)
|
|
|
|
|
2021-01-19 16:27:05 +03:00
|
|
|
let __licenseText = '''
|
2022-05-26 14:46:06 +03:00
|
|
|
Copyright (c) 2020-2022 K. Lange <klange@toaruos.org>
|
2021-04-12 15:00:15 +03:00
|
|
|
Copyright (c) 2015 Robert Nystrom
|
|
|
|
|
|
|
|
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:
|
|
|
|
|
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
|
|
|
|
|
|
|
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.
|
2021-01-19 16:27:05 +03:00
|
|
|
'''
|
|
|
|
|