def cli(): import re import sys try: from jupyter_core.command import main have_jupyter = True except Exception: have_jupyter = False if have_jupyter: sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0]) sys.exit(main()) else: print("Cannot find jupyter. Install using, e.g. " "'pip install jupyter jupyterlab'") sys.exit(-1)
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Mini OSS launcher so we can build a py_binary for OSS.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from jupyter_core.command import main if __name__ == '__main__': exit(main())
#!/usr/bin/env python from jupyter_core import command import sys sys.argv.append("lab") command.main()
#!/usr/bin/python3 # -*- coding: utf-8 -*- import re import sys from jupyter_core.command import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main())
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== """Mini OSS launcher so we can build a py_binary for OSS.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from jupyter_core.command import main if __name__ == '__main__': exit(main())
"""Launch the root jupyter command""" from jupyter_core.command import main if __name__ == '__main__': main()
"""Launch the root jupyter command""" if __name__ == "__main__": from jupyter_core.command import main main()