[GRASS-SVN] r47055 - grass-addons/grass7/gui/wxpython/wx.wms
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 7 20:24:57 EDT 2011
Author: sudeepsingh
Date: 2011-07-07 17:24:57 -0700 (Thu, 07 Jul 2011)
New Revision: 47055
Modified:
grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
Log:
Minor update to call function to display image in new frame
Modified: grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py
===================================================================
--- grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-07-08 00:24:13 UTC (rev 47054)
+++ grass-addons/grass7/gui/wxpython/wx.wms/wmsmenu.py 2011-07-08 00:24:57 UTC (rev 47055)
@@ -4,11 +4,13 @@
from urllib2 import Request, urlopen, URLError, HTTPError
import wx
from parse import parsexml
+import cStringIO
+from image import NewImageFrame
-class Example(wx.Frame):
+class WMSGUI(wx.Frame):
def __init__(self, parent, title):
- super(Example, self).__init__(parent, title=title,
+ super(WMSGUI, self).__init__(parent, title=title,
size=(390, 350))
self.InitUI()
@@ -91,12 +93,18 @@
outfile.write(image)
outfile.close()
+ NewImageFrame()
+
+
except HTTPError, e:
print 'The server couldn\'t fulfill the request.'
print 'Error code: ', e.code
except URLError, e:
print 'We failed to reach a server.'
print 'Reason: ', e.reason
+ except IOError:
+ print "Image file %s not found" % imageFile
+ raise SystemExit
else:
print 'Successful'
@@ -131,7 +139,7 @@
'''
def func():
app = wx.App()
- Example(None, title='WMS')
+ WMSGUI(None, title='WMS')
app.MainLoop()
'''
@@ -139,5 +147,5 @@
if __name__ == '__main__':
app = wx.App()
- Example(None, title='WMS')
+ WMSGUI(None, title='WMS')
app.MainLoop() '''
More information about the grass-commit
mailing list