Skip to content

Commit

Permalink
Fix bug in interpreter (handling command "help")
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreQuentel committed Mar 3, 2024
1 parent 4b39405 commit 9be6e69
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions www/src/Lib/interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,11 @@ def handle_line(self, event=None):
if self._status in ["main", "3string", "parenth_expr"]:
# special case
if currentLine == "help":
self.insert_cr()
self.write(_help)
self.insert_cr()
self.insert_prompt()
self.cursor_to_end()
if event is not None:
event.preventDefault()
return
Expand Down
6 changes: 3 additions & 3 deletions www/src/brython.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ $B.unicode_bidi_whitespace=[9,10,11,12,13,28,29,30,31,32,133,5760,8192,8193,8194
;
__BRYTHON__.implementation=[3,12,1,'dev',0]
__BRYTHON__.version_info=[3,12,0,'final',0]
__BRYTHON__.compiled_date="2024-03-01 14:07:29.542641"
__BRYTHON__.timestamp=1709298449542
__BRYTHON__.compiled_date="2024-03-03 17:06:55.562644"
__BRYTHON__.timestamp=1709482015562
__BRYTHON__.builtin_module_names=["_ajax","_ast","_base64","_binascii","_io_classes","_json","_jsre","_locale","_multiprocessing","_posixsubprocess","_profile","_random","_sre","_sre_utils","_string","_strptime","_svg","_symtable","_tokenize","_webcomponent","_webworker","_zlib_utils","array","builtins","dis","encoding_cp932","encoding_cp932_v2","hashlib","html_parser","marshal","math","modulefinder","posix","pyexpat","python_re","python_re_new","unicodedata"]
;

Expand Down Expand Up @@ -10763,7 +10763,7 @@ throw _b_.TypeError.$factory(`object ${$B.class_name(obj)} `+
`can't be used in 'await' expression`)}})(__BRYTHON__)
;

(function($B){$B.builtin_class_flags={builtins:{1074287874:['ReferenceError','SyntaxWarning','ConnectionAbortedError','Exception','OSError','KeyboardInterrupt','PermissionError','UnicodeTranslateError','InterruptedError','RuntimeWarning','Warning','SystemExit','ImportWarning','BaseException','FileNotFoundError','GeneratorExit','NotImplementedError','LookupError','WindowsError','IsADirectoryError','StopAsyncIteration','BlockingIOError','DeprecationWarning','StopIteration','BufferError','MemoryError','BaseExceptionGroup','FileExistsError','ModuleNotFoundError','ProcessLookupError','OverflowError','SyntaxError','EOFError','SystemError','RuntimeError','AssertionError','BytesWarning','EncodingWarning','RecursionError','ArithmeticError','PendingDeprecationWarning','TabError','UnboundLocalError','UnicodeDecodeError','NotADirectoryError','ResourceWarning','ChildProcessError','UnicodeError','BrokenPipeError','EnvironmentError','FloatingPointError','ValueError','UnicodeWarning','IndexError','NameError','IndentationError','ConnectionRefusedError','AttributeError','ConnectionError','FutureWarning','IOError','KeyError','TypeError','ConnectionResetError','TimeoutError','UnicodeEncodeError','ZeroDivisionError','ImportError','UserWarning'],1073763848:['ExceptionGroup'],21500162:['bool'],4723970:['bytearray','float'],138941698:['bytes'],546050:['zip','property','enumerate','classmethod','map','staticmethod','reversed','super','filter'],529666:['object','complex'],541611330:['dict'],4740354:['set','frozenset'],21501186:['int'],38294818:['list'],545058:['memoryview'],528674:['range'],545026:['slice'],273159426:['str'],71849250:['tuple'],2156420354:['type'],},types:{545154:['method-wrapper','async_generator','classmethod_descriptor','member_descriptor','getset_descriptor','coroutine','generator','frame'],547202:['builtin_function_or_method'],545026:['traceback','cell'],528642:['NotImplementedType','ellipsis','code','NoneType'],678146:['function'],545090:['mappingproxy'],678274:['method_descriptor'],547074:['method'],546050:['module'],676226:['wrapper_descriptor'],}}})(__BRYTHON__)
(function($B){$B.builtin_class_flags={builtins:{1074287874:['Warning','StopAsyncIteration','ProcessLookupError','ImportWarning','Exception','RuntimeError','KeyError','KeyboardInterrupt','UnicodeTranslateError','EncodingWarning','OSError','AssertionError','BytesWarning','UnicodeError','TabError','NameError','BaseExceptionGroup','SyntaxWarning','ReferenceError','UserWarning','FutureWarning','IndentationError','LookupError','TimeoutError','RuntimeWarning','RecursionError','FileNotFoundError','IsADirectoryError','UnicodeWarning','IOError','MemoryError','IndexError','PermissionError','SystemError','PendingDeprecationWarning','EnvironmentError','FileExistsError','ArithmeticError','SyntaxError','InterruptedError','BrokenPipeError','BaseException','ConnectionRefusedError','FloatingPointError','ChildProcessError','EOFError','UnboundLocalError','BufferError','SystemExit','NotImplementedError','ValueError','ConnectionResetError','NotADirectoryError','UnicodeDecodeError','WindowsError','ZeroDivisionError','ConnectionAbortedError','ResourceWarning','AttributeError','ImportError','BlockingIOError','GeneratorExit','ConnectionError','UnicodeEncodeError','TypeError','OverflowError','StopIteration','ModuleNotFoundError','DeprecationWarning'],1073763848:['ExceptionGroup'],21500162:['bool'],4723970:['bytearray','float'],138941698:['bytes'],546050:['reversed','classmethod','super','staticmethod','enumerate','property','map','zip','filter'],529666:['complex','object'],541611330:['dict'],4740354:['set','frozenset'],21501186:['int'],38294818:['list'],545058:['memoryview'],528674:['range'],545026:['slice'],273159426:['str'],71849250:['tuple'],2156420354:['type'],},types:{545154:['frame','generator','method-wrapper','member_descriptor','coroutine','async_generator','classmethod_descriptor','getset_descriptor'],547202:['builtin_function_or_method'],545026:['cell','traceback'],528642:['NoneType','NotImplementedType','code','ellipsis'],678146:['function'],545090:['mappingproxy'],678274:['method_descriptor'],547074:['method'],546050:['module'],676226:['wrapper_descriptor'],}}})(__BRYTHON__)
;
(function($B){var _b_=$B.builtins
var update=$B.update_obj=function(mod,data){for(let attr in data){mod[attr]=data[attr]}}
Expand Down
2 changes: 1 addition & 1 deletion www/src/brython_stdlib.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions www/src/version_info.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__BRYTHON__.implementation = [3, 12, 1, 'dev', 0]
__BRYTHON__.version_info = [3, 12, 0, 'final', 0]
__BRYTHON__.compiled_date = "2024-03-01 14:07:29.542641"
__BRYTHON__.timestamp = 1709298449542
__BRYTHON__.compiled_date = "2024-03-03 17:06:55.562644"
__BRYTHON__.timestamp = 1709482015562
__BRYTHON__.builtin_module_names = ["_ajax",
"_ast",
"_base64",
Expand Down

0 comments on commit 9be6e69

Please sign in to comment.