Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix a regression

  • Loading branch information...
commit f74c8bea8a978b1106d7e9c3d4be7afdb1202ab4 1 parent 4282d6d
@wiinnie-the-pooh wiinnie-the-pooh authored
View
12 lib/reinteract/notebook_window.py
@@ -250,9 +250,17 @@ def on_hpaned_notify_position(self, pane, gparamspec):
import stdout_capture
stdout_capture.init()
+ import os, sys
+ script_path = os.path.realpath(os.path.abspath(sys.argv[0])).decode("UTF-8")
+ topdir = os.path.dirname(os.path.dirname(script_path))
+ topdir = os.path.dirname(topdir)
+ libdir = os.path.join(topdir, 'lib')
+ sys.path.insert(0, libdir)
+
+ examplesdir = os.path.join(topdir, 'examples')
+
from notebook import Notebook
- from worksheet import Worksheet
- a_notebook = Notebook('/home/alexey/reinteract/examples'.decode("UTF-8"))
+ a_notebook = Notebook(examplesdir)
a_window = NotebookWindow(a_notebook)
a_window.window.show()
gtk.main()
View
7 lib/reinteract/worksheet_editor.py
@@ -157,6 +157,13 @@ def redo(self):
import logging
logging.basicConfig(level=logging.DEBUG, format="DEBUG: %(message)s")
+ import os, sys
+ script_path = os.path.realpath(os.path.abspath(sys.argv[0])).decode("UTF-8")
+ topdir = os.path.dirname(os.path.dirname(script_path))
+ topdir = os.path.dirname(topdir)
+ libdir = os.path.join(topdir, 'lib')
+ sys.path.insert(0, libdir)
+
from global_settings import global_settings
notebook_dir = os.path.expanduser(os.path.join(global_settings.notebooks_dir, "Main"))
Please sign in to comment.
Something went wrong with that request. Please try again.