Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upOWGrep: Add widget #107
Conversation
kernc
reviewed
Dec 21, 2017
| auto_send = Setting(True) | ||
| find_text = Setting("") | ||
|
|
||
| re_number = re.compile(r"^([+-]?\d+([.,]\d+)?)$") |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ajdapretnar
reviewed
Dec 21, 2017
| self.file_changed() | ||
|
|
||
| def file_changed(self): | ||
| name = "/Users/janez/Desktop/out.out" |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kernc
reviewed
Dec 21, 2017
| column_names = line.split() | ||
| line = next(lines) | ||
| for i in range(self.use_lines): | ||
| data.append(line.split()) |
This comment has been minimized.
This comment has been minimized.
kernc
Dec 21, 2017
Member
Love the undocumented state machine!
So this only splits matching lines by whitespace?
What if different lines have different number of tokens?
kernc
reviewed
Dec 21, 2017
| lines = iter(self.file_lines) | ||
| column_names = None | ||
| for line in lines: | ||
| if self.text in line: |
This comment has been minimized.
This comment has been minimized.
jerneju
reviewed
Dec 21, 2017
| from Orange.widgets import gui | ||
| from Orange.widgets.settings import Setting | ||
| from Orange.widgets.widget import OWWidget, Msg, Output | ||
|
|
This comment has been minimized.
This comment has been minimized.
jerneju
reviewed
Dec 21, 2017
| copy.setShortcuts(QKeySequence(Qt.Key_C | Qt.ControlModifier)) | ||
| in_view.addAction(copy) | ||
| for action in in_view.actions(): | ||
| print(action.text()) |
This comment has been minimized.
This comment has been minimized.
janezd
changed the title
OWGrep: Add widget
[WIP] OWGrep: Add widget
Dec 21, 2017
This comment has been minimized.
This comment has been minimized.
|
Oh, oh, stop it guys. :) That's something I quickly put together to show Feri how to make new widgets. It's a long long way from being done. I've just put it here to share it with Feri. Big apologies for forgetting adding a WIP tag. No need to review it at this phase. |
janezd
changed the title
[WIP] OWGrep: Add widget
[WIP] [NO-RFC] OWGrep: Add widget
Dec 21, 2017
This comment has been minimized.
This comment has been minimized.
|
I don't think there has been a widget in the history of Orange that was reviewed as quickly as this one. |
janezd
force-pushed the
janezd:owgrep
branch
from
1790345
to
ab269ba
Dec 22, 2017
janezd
changed the title
[WIP] [NO-RFC] OWGrep: Add widget
[WIP] OWGrep: Add widget
Dec 22, 2017
janezd
force-pushed the
janezd:owgrep
branch
from
ab269ba
to
5330a65
Dec 28, 2017
janezd
changed the title
[WIP] OWGrep: Add widget
OWGrep: Add widget
Dec 28, 2017
janezd
changed the title
OWGrep: Add widget
[WIP] OWGrep: Add widget
Dec 28, 2017
janezd
force-pushed the
janezd:owgrep
branch
from
5330a65
to
70c0623
Dec 28, 2017
janezd
changed the title
[WIP] OWGrep: Add widget
OWGrep: Add widget
Dec 28, 2017
janezd
added some commits
Dec 28, 2017
janezd
force-pushed the
janezd:owgrep
branch
from
98acb91
to
df3bad4
Dec 29, 2017
This comment has been minimized.
This comment has been minimized.
|
I cannot open file. Traceback (most recent call last):
File "/prototypes/widgets/owgrep.py", line 189, in browse_file
self.open_file()
File "/prototypes/widgets/owgrep.py", line 208, in open_file
text = f.read()
File "/python3.5/codecs.py", line 321, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte |
jerneju
approved these changes
Jan 19, 2018
jerneju
merged commit 7c32af5
into
biolab:master
Jan 19, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
janezd commentedDec 21, 2017
•
edited
A widget for getting the data from a text file, like a log.
Includes