-
-
Notifications
You must be signed in to change notification settings - Fork 424
Conversation
Also, another note: this depends on the |
io.IOBase = function(args, kwargs) { | ||
var types = require('../types') | ||
|
||
PyObject.call(this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
create_pyclass(io.IOBase, 'IOBase') | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create_pyclass(io.IOBase, 'IOBase') | ||
|
||
io.IOBase.__repr__ = function() { | ||
return '<IOBase object at 0x99999999>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
io.IOBase.prototype.__ne__ = function(other) { | ||
return this === other | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
io.IOBase.prototype.__ne__ = function(other) { | ||
return this === other | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
|
||
io.IOBase.prototype.__ne__ = function(other) { | ||
return this === other | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this === other | ||
} | ||
|
||
io.IOBase.prototype.close = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return this === other | ||
} | ||
|
||
io.IOBase.prototype.close = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
this.closed = true | ||
} | ||
else { | ||
// only the first call will have an effect; multiple close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.closed = true | ||
} | ||
else { | ||
// only the first call will have an effect; multiple close() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
} | ||
|
||
io.IOBase.prototype.closed = false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
io.IOBase.prototype.closed = false | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
io.IOBase.prototype.fileno = function() { | ||
throw new exceptions.UnsupportedOperation.$pyclass( | ||
'fileno' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.IOBase.prototype.fileno = function() { | ||
throw new exceptions.UnsupportedOperation.$pyclass( | ||
'fileno' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
} | ||
|
||
io.IOBase.prototype.flush = function() { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
io.IOBase.prototype.flush = function() { | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
|
||
io.IOBase.prototype.flush = function() { | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
io.IOBase.prototype.flush = function() { | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
io.IOBase.prototype.flush = function() { | ||
} | ||
|
||
// since we're in Javascript, we're not in a TTY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.IOBase.prototype.flush = function() { | ||
} | ||
|
||
// since we're in Javascript, we're not in a TTY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
} | ||
|
||
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
} | ||
|
||
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { | ||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { | ||
return false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { | ||
return false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// since we're in Javascript, we're not in a TTY | ||
io.IOBase.prototype.isatty = function() { | ||
return false | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
io.IOBase.prototype.isatty = function() { | ||
return false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.IOBase.prototype.isatty = function() { | ||
return false | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
return false | ||
} | ||
|
||
io.IOBase.prototype.readable = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false | ||
} | ||
|
||
io.IOBase.prototype.readable = function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
throw new exceptions.UnsupportedOperation.$pyclass( | ||
'seek' | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new exceptions.UnsupportedOperation.$pyclass( | ||
'seek' | ||
) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
|
||
io.IOBase.prototype.seekable = function() { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
io.IOBase.prototype.seekable = function() { | ||
return false; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 2: (no-tabs) Unexpected tab character.
|
||
io.IOBase.prototype.tell = function() { | ||
throw new exceptions.UnsupportedOperation.$pyclass( | ||
'seek' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At column 1: (no-trailing-spaces) Trailing spaces not allowed.
Hi there! It looks like this PR might be dead, so we're closing it for now. Feel free to re-open it if you'd like to continue, or think about directing your efforts to https://github.com/beeware/briefcase or https://github.com/beeware/toga. Both of these have more active development right now. 😄 |
In this PR, I add the io module to Batavia.
Although one may naively implement the
open()
call as a standalone entity, a lot of Python depends on IO buffers–meaning that the io module is important for a lot more than files. Emulating a filesystem is very useful in porting system scripts to the browser, allowing for easy data storage (by allowingpickle
or similar to write to what it wants to see, a writable file object).PR Checklist:
NOTE: this is in progress! Please don't merge yet :)