Show More
@@ -2,7 +2,7 b'' | |||
|
2 | 2 | # -*- coding: iso-8859-15 -*- |
|
3 | 3 | |
|
4 | 4 | import wx.aui |
|
5 | ||
|
5 | import sys | |
|
6 | 6 | #used for about dialog |
|
7 | 7 | from wx.lib.wordwrap import wordwrap |
|
8 | 8 | |
@@ -10,6 +10,9 b' from wx.lib.wordwrap import wordwrap' | |||
|
10 | 10 | from IPython.gui.wx.ipython_view import IPShellWidget |
|
11 | 11 | from IPython.gui.wx.ipython_history import IPythonHistoryPanel |
|
12 | 12 | |
|
13 | #used to create options.conf file in user directory | |
|
14 | from IPython.ipapi import get | |
|
15 | ||
|
13 | 16 | __version__ = 0.8 |
|
14 | 17 | __author__ = "Laurent Dufrechou" |
|
15 | 18 | __email__ = "laurent.dufrechou _at_ gmail.com" |
@@ -84,7 +87,9 b' class MyFrame(wx.Frame):' | |||
|
84 | 87 | dlg.Destroy() |
|
85 | 88 | |
|
86 | 89 | def optionSave(self, name, value): |
|
87 | opt = open('options.conf','w') | |
|
90 | ip = get() | |
|
91 | path = ip.IP.rc.ipythondir | |
|
92 | opt = open(path + '/options.conf','w') | |
|
88 | 93 | |
|
89 | 94 | try: |
|
90 | 95 | options_ipython_panel = self.ipython_panel.getOptions() |
@@ -98,7 +103,10 b' class MyFrame(wx.Frame):' | |||
|
98 | 103 | opt.close() |
|
99 | 104 | |
|
100 | 105 | def optionLoad(self): |
|
101 | opt = open('options.conf','r') | |
|
106 | try: | |
|
107 | ip = get() | |
|
108 | path = ip.IP.rc.ipythondir | |
|
109 | opt = open(path + '/options.conf','r') | |
|
102 | 110 | lines = opt.readlines() |
|
103 | 111 | opt.close() |
|
104 | 112 | |
@@ -117,6 +125,10 b' class MyFrame(wx.Frame):' | |||
|
117 | 125 | self.ipython_panel.reloadOptions(options_ipython_panel) |
|
118 | 126 | self.history_panel.reloadOptions(options_history_panel) |
|
119 | 127 | |
|
128 | except IOError: | |
|
129 | print >>sys.__stdout__,"Could not open Options.conf, defaulting to default values." | |
|
130 | ||
|
131 | ||
|
120 | 132 | def createMenu(self): |
|
121 | 133 | """local method used to create one menu bar""" |
|
122 | 134 |
|
1 | NO CONTENT: file was removed |
General Comments 0
You need to be logged in to leave comments.
Login now