forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdummyJupyter.py
More file actions
25 lines (21 loc) · 893 Bytes
/
dummyJupyter.py
File metadata and controls
25 lines (21 loc) · 893 Bytes
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
# This file can mimic juypter running. Useful for testing jupyter crash handling
import sys
import argparse
import time
def main():
print('hello from dummy jupyter')
parser = argparse.ArgumentParser()
parser.add_argument('--version', type=bool, default=False, const=True, nargs='?')
parser.add_argument('notebook', type=bool, default=False, const=True, nargs='?')
parser.add_argument('--no-browser', type=bool, default=False, const=True, nargs='?')
parser.add_argument('--notebook-dir', default='')
parser.add_argument('--config', default='')
results = parser.parse_args()
if (results.version):
print('1.1.dummy')
else:
print('http://localhost:8888/?token=012f08663a68e279fe0a5335e0b5dfe44759ddcccf0b3a56')
time.sleep(5)
raise Exception('Dummy is dead')
if __name__ == '__main__':
main()