Skip to content

sys command results in error #955

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

Closed
thevibingcat opened this issue Mar 29, 2022 · 3 comments
Closed

sys command results in error #955

thevibingcat opened this issue Mar 29, 2022 · 3 comments
Labels
Milestone

Comments

@thevibingcat
Copy link

thevibingcat commented Mar 29, 2022

when i enter the following code, this happens:

>>> v = sys.stdin.readline()
here is some text
>>> print(v)
here is some text
>>> v = sys.stdin.readline(13)
here is some text
[error text blah blah blah]```


what is supposed to happen is sys is supposed to save the first 13 characters (including spaces) of "here is some text".
if i do this in the actual IDLE, it does what is intended. but this does not happen in bpython. please fix this and any other commands that do not match up with the original python.
I am using Ubuntu 20.04.1, and the IDLE i mentioned is python 3.8 and bpython 0.18
Thank you.
@sebastinas sebastinas added the bug label Mar 30, 2022
@sebastinas sebastinas added this to the release-0.23 milestone Mar 30, 2022
@sebastinas
Copy link
Contributor

The relevant error is:

>>> sys.stdin.readline(13)
Traceback (most recent call last):
  File "<input>", line 1, in <module>
    v = sys.stdin.readline(13)
TypeError: readline() takes 1 positional argument but 2 were given

@ulisesojeda
Copy link
Contributor

I'll take care of it

@sebastinas
Copy link
Contributor

This is now fixed thanks to @ulisesojeda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants