-
Notifications
You must be signed in to change notification settings - Fork 897
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
Call to open('filename.txt') with a single parameter fails #33
Comments
Thanks! |
I could not find anything in the checked out repo - I was suggesting a readme in the actual code tree. No big deal on the duplicate effort. It may be just as well - I did all my learning on the Google code repo so I should be better prepared here. And I waayyy prefer git and github so I applaud the move and am glad to come here and find real activity. |
That could be because I just created and pushed the README this morning. BradBrad Miller On Jan 23, 2013, at 12:35 PM, Charles Severance notifications@github.com wrote:
|
Love it! Now I can go back to fixing open() :) |
This is Issue 118 on Google Code. |
Make open('filename') without the second parameter work. There is no unit test because I don't know how to set it up. The way I test this in a browser is without this change, the following code: h = open("mbox-short.txt") print len(h.read()) Throws "todo; haven't implemented non-read opens" With this fix the code works.
This is fixed in |
Hi Charles, Use words.txt as the file namefname = raw_input("Enter file name: ") for line in fh: |
If you do not provide 'r' as the second parameter on an open, Skulpt will fail with a
todo; haven't implemented non-read opens
But the open should be a read open. The problem is that the line in src/builtins.py that would solve this:
Is wrong and should be:
I have fixed this in the old repo here
http://code.google.com/r/drchuck-skulpt-mods/source/detail?r=85c1f4b4a8757c6f5c4b8ba190311b3dbc9b701e
I will fork this repo, make the fix, and submit a pull request.
This is the first of a number of small fixes that I have already done in the Google Code repo that I will be bringing across to the Github repo. Comments welcome.
The text was updated successfully, but these errors were encountered: