Fix some issues with Python3

parent 31f63d78
......@@ -265,6 +265,7 @@ wxStfParentType(manager, frame, wxID_ANY, title, pos, size, type, _T("myFrame"))
#ifdef WITH_PYTHON
python_code2 << wxT("import sys\n")
<< wxT("sys.path.append('.')\n")
<< wxT("sys.path.append('/usr/local/lib/stimfit')\n")
#ifdef IPYTHON
<< wxT("import embedded_ipython\n")
......
......@@ -14,6 +14,7 @@ if 'win' in sys.platform:
import wxversion
wxversion.select('3.0-msw')
import wx
wx.CallAfter = lambda x, y : (x, y)
from wx.py import shell
# to access the current versions of Stimfit, NumPy and wxPython
......@@ -38,7 +39,6 @@ class MyPanel(wx.Panel):
style = wx.BORDER_NONE | wx.MAXIMIZE)
# the Pycrust shell object
wx.CallAfter = lambda x, y : (x, y)
self.pycrust = shell.Shell(self,-1, \
introText = intro_msg() + LOADED)
......@@ -46,7 +46,7 @@ class MyPanel(wx.Panel):
if "darwin" in sys.platform:
self.pycrust.autoCallTip = False
# self.pycrust.push('from embedded_init import *', silent = True)
self.pycrust.push('from embedded_init import *', silent = True)
sizer = wx.BoxSizer(wx.VERTICAL)
sizer.Add(self.pycrust, 1, wx.EXPAND | wx.BOTTOM | wx.LEFT | wx.RIGHT, 10)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment