Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is the interactive interpreter (REPL) supposed to work? #54

Open
dosentmatter opened this issue Jan 22, 2022 · 3 comments
Open

Is the interactive interpreter (REPL) supposed to work? #54

dosentmatter opened this issue Jan 22, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@dosentmatter
Copy link

dosentmatter commented Jan 22, 2022

  • Running any statement does not seem to do anything.
  • The only way to exit is to kill the program with CTRL+C, 收工 doesn't work.
% Cantonese 
早晨!
> 畀我睇下 " Hello World! " 点样先?
> 
> 收工
> 
> Traceback (most recent call last):
  File "/Users/dosentmatter/.pyenv/versions/3.9.6/bin/Cantonese", line 8, in <module>
    sys.exit(main())
  File "/Users/dosentmatter/.pyenv/versions/3.9.6/lib/python3.9/site-packages/src/cantonese.py", line 3125, in main
    sys.exit(开始交互())
  File "/Users/dosentmatter/.pyenv/versions/3.9.6/lib/python3.9/site-packages/src/cantonese.py", line 3089, in 开始交互
    交互().cmdloop("早晨!")
  File "/Users/dosentmatter/.pyenv/versions/3.9.6/lib/python3.9/cmd.py", line 126, in cmdloop
    line = input(self.prompt)
KeyboardInterrupt
@StepfenShawn StepfenShawn added the bug Something isn't working label Jan 25, 2022
@StepfenShawn
Copy link
Owner

it is fixed in the new version!

pip install -U Cantonese
C:\Users\Administrator>cantonese
Cantonese 1.0 Copyright (C) 2020-2022 StepfenShawn
Tue Jan 25 19:58:56 2022
> 畀我睇下 "Hello World" 点样先?
Hello World
>收工
C:\Users\Administrator>

@nobodxbodon
Copy link
Contributor

刚用 python src/cantonese.py 启动repl 测了,确认已修复。

@dosentmatter
Copy link
Author

dosentmatter commented Jan 26, 2022

@StepfenShawn, thanks for the quick fix. I can also confirm that it works better now.

But now it seems like there's another bug. After entering a command and then just hitting <ENTER> a bunch of times, it increasingly prints more output.

% cantonese
Cantonese 1.0 Copyright (C) 2020-2022 StepfenShawn
Tue Jan 25 21:43:46 2022
> 畀我睇下 "Hello World" 点样先?
Hello World
> 
Hello World
Hello World
> 
Hello World
Hello World
Hello World
> 
Hello World
Hello World
Hello World
Hello World
> 
Hello World
Hello World
Hello World
Hello World
Hello World
> 
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
> 
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants