from types import *
import os, re, platform, sys, time, traceback, getopt
-__version__ = "$Revision: 1.24 $"
+__version__ = "$Revision: 1.25 $"
from nodelist import *
from nodemanager import *
find_index = True
index, subIndex = result
result = OpenPDFDocIndex(index, ScriptDirectory)
- if type(result) == StringType:
+ if isinstance(result, (StringType, UnicodeType)):
message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
if not find_index:
result = OpenPDFDocIndex(None, ScriptDirectory)
- if type(result) == StringType:
+ if isinstance(result, (StringType, UnicodeType)):
message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
if dialog.ShowModal() == wx.ID_OK:
index, name, struct, number = dialog.GetValues()
result = self.Manager.AddMapVariableToCurrent(index, name, struct, number)
- if type(result) != StringType:
+ if not isinstance(result, (StringType, UnicodeType)):
self.RefreshBufferState()
self.RefreshCurrentIndexList()
else:
from types import *
import os, re, platform, sys, time, traceback, getopt
-__version__ = "$Revision: 1.44 $"
+__version__ = "$Revision: 1.45 $"
from node import OD_Subindex, OD_MultipleSubindexes, OD_IdenticalSubindexes, OD_IdenticalIndexes
self.Manager = NodeManager()
for filepath in filesOpen:
result = self.Manager.OpenFileInCurrent(filepath)
- if type(result) == IntType:
+ if isinstance(result, (IntType, LongType)):
new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
new_editingpanel.SetIndex(result)
self.FileOpened.AddPage(new_editingpanel, "")
find_index = True
index, subIndex = result
result = OpenPDFDocIndex(index, ScriptDirectory)
- if type(result) == StringType:
+ if isinstance(result, (StringType, UnicodeType)):
message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
if not find_index:
result = OpenPDFDocIndex(None, ScriptDirectory)
- if type(result) == StringType:
+ if isinstance(result, (StringType, UnicodeType)):
message = wx.MessageDialog(self, result, "ERROR", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
NMT = dialog.GetNMTManagement()
options = dialog.GetOptions()
result = self.Manager.CreateNewNode(name, id, nodetype, description, profile, filepath, NMT, options)
- if type(result) == IntType:
+ if isinstance(result, (IntType, LongType)):
new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
new_editingpanel.SetIndex(result)
self.FileOpened.AddPage(new_editingpanel, "")
filepath = dialog.GetPath()
if os.path.isfile(filepath):
result = self.Manager.OpenFileInCurrent(filepath)
- if type(result) == IntType:
+ if isinstance(result, (IntType, LongType)):
new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
new_editingpanel.SetIndex(result)
self.FileOpened.AddPage(new_editingpanel, "")
result = self.Manager.SaveCurrentInFile()
if not result:
self.SaveAs()
- elif type(result) != StringType:
+ elif not isinstance(result, (StringType, UnicodeType)):
self.RefreshBufferState()
else:
message = wx.MessageDialog(self, result, "Error", wx.OK|wx.ICON_ERROR)
filepath = dialog.GetPath()
if os.path.isdir(os.path.dirname(filepath)):
result = self.Manager.SaveCurrentInFile(filepath)
- if type(result) != StringType:
+ if not isinstance(result, (StringType, UnicodeType)):
self.RefreshBufferState()
else:
message = wx.MessageDialog(self, result, "Error", wx.OK|wx.ICON_ERROR)
filepath = dialog.GetPath()
if os.path.isfile(filepath):
result = self.Manager.ImportCurrentFromEDSFile(filepath)
- if type(result) == IntType:
+ if isinstance(result, (IntType, LongType)):
new_editingpanel = EditingPanel(self.FileOpened, self, self.Manager)
new_editingpanel.SetIndex(result)
self.FileOpened.AddPage(new_editingpanel, "")
if dialog.ShowModal() == wx.ID_OK:
index, name, struct, number = dialog.GetValues()
result = self.Manager.AddMapVariableToCurrent(index, name, struct, number)
- if type(result) != StringType:
+ if not isinstance(result, (StringType, UnicodeType)):
self.RefreshBufferState()
self.RefreshCurrentIndexList()
else: