POST
|
I ended up driving the screw in with a hammer. CGI and python.
... View more
07-13-2012
01:16 PM
|
0
|
0
|
460
|
POST
|
From - http://forums.arcgis.com/threads/34814-Exposing-Arcpy-Python-Script-to-Web >> There's WSGI, which is an open standard that allows you to develop in Django, or Pyramid, or web.py, or flask, or any of a number of other options. Flask or web.py are probably your best bet for porting from CGI. If you run a web application that handles multiple requests in the same process (that is, running a Python WSGI server behind your IIS instance) then you don't incur the overhead of importing arcpy over and over. >>
... View more
07-10-2012
12:21 PM
|
0
|
0
|
460
|
POST
|
Thanks Jason. Is there a WSGI server you would recommend?
... View more
07-10-2012
12:17 PM
|
0
|
0
|
460
|
POST
|
I???m trying to return data to a web page from a simple processioning procedure. I keep getting the following error ???self._gp.SearchCursor(*gp_fixargs(args))) RuntimeError: ERROR 999999: Error executing function.??? The processioning function works fine standalone but fails when ran with through CherryPy. I think it???s a pathing issue but haven???t had any luck solving it.[ATTACH=CONFIG]15889[/ATTACH] Any help would be greatly appreciated. Code follows as well as being attached with table. ## import cherrypy import arcpy class StartPage: def index(self): # This is the starting web page for the HOA selection application return ''' <p><a href="http://TheServerName:8080/get_database" target="_parent">database pull</a></p> <p><a href="http://TheServerName:8080/get_text" target="_parent">text pull</a></p>''' index.exposed = True def get_database(self): info = data_extract() return info get_database.exposed = True def get_text(self): return """Great! this worked<p><p><a href="http://TheServerName:8080/" target="_parent">back</a></p> </p> """ get_text.exposed = True def data_extract(): Notification_Table = "C:/web.dbf" rows = arcpy.SearchCursor(Notification_Table) row = rows.next() return_string = "" while row: name = row.getValue("NAME") return_string = return_string + 'name: %s\n' % name row = rows.next() return return_string import os.path hoaconf = os.path.join(os.path.dirname(__file__), 'hoa.conf') if __name__ == '__main__': cherrypy.quickstart(StartPage(), config=hoaconf) else: cherrypy.tree.mount(StartPage(), config=hoaconf) ##
... View more
07-09-2012
03:01 PM
|
0
|
5
|
1144
|
Online Status |
Offline
|
Date Last Visited |
10-28-2021
12:50 PM
|