Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
42 lines (28 loc) · 1.22 KB

File metadata and controls

42 lines (28 loc) · 1.22 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""Non-keyboard events used in bpython curtsies REPL"""
import time
import curtsies.events
class ReloadEvent(curtsies.events.Event):
"""Request to rerun REPL session ASAP because imported modules changed"""
def __init__(self, files_modified=('?',)):
self.files_modified = files_modified
def __repr__(self):
return "<ReloadEvent from %s>" % (' & '.join(self.files_modified))
class RefreshRequestEvent(curtsies.events.Event):
"""Request to refresh REPL display ASAP"""
def __repr__(self):
return "<RefreshRequestEvent for now>"
class ScheduledRefreshRequestEvent(curtsies.events.ScheduledEvent):
"""Request to refresh the REPL display at some point in the future
Used to schedule the disappearance of status bar message that only shows
for a few seconds"""
def __init__(self, when):
self.when = when # time.time() + how long
def __repr__(self):
return ("<RefreshRequestEvent for %s seconds from now>" %
(self.when - time.time()))
class RunStartupFileEvent(curtsies.events.Event):
"""Request to run the startup file."""
class UndoEvent(curtsies.events.Event):
"""Request to undo."""
def __init__(self, n=1):
self.n = n
Morty Proxy This is a proxified and sanitized view of the page, visit original site.