Let me know your last question again. I just created Python as script language while using Python in ArcGIS. Equipment subprocess. Runs an external program (runs) using Pappen. When I run the tool from ArcGSIS, a window appears that only runs the following
. RunFLOW C: \ Flow C: \ Flow \ FLW.bat Start Time: Mon Nov 30, 16 50:37 am 200 9 script running Rnflo ... full script RuFLOW ... execute (Rnflo) successful completion time: Mon 30 Nov 16:50:48 2009 (time has passed: 11.00 seconds)
script Import follows
# Import system modules # 1 :: input Vertical prj_fld = gp.GetParameterAsText (0) Flow_bat = gp.GetParameterAsText (1) OS sys, string, OS, Arcgisscripting, Upprkriya # Geoprocessor object GP = arcgisscripting.create () # W Create Read Ramitr value. chdir (prj_fld) p = subprocess.Popen (Flow_bat, shell = True, stdout = subprocess.PIPE) stdout_value = p.communicate () [0] print '\ tstdout:', wrapper (stdout_value)
When I run the same program from the command window, it prints the screen-filled information (date, number of iterations etc.). I want to see all the information in the window which appears after the model is run from Orgis, besides what is being printed in it. I tried to print, communicate, flush, but could not be able to do this. Any suggestion
When I run the script as it is now, it runs executable, but as
error 999,998 it returns an error like this :? Any more files here
Thank you
I do not know anything about ArcGIS, So I may be shooting here in the dark, but ... If you want a stdout, then you usually do not want the dialog ()
method to make you something like this:
P = subprocess.Popen (Flow_bat, shell = true, stdout = subprocess.PIPE) stdout_value = p.stdout.read ()
with a process < em> Interacting to communications ()
method is used for documentation:
< Code> interact with the process: send the data to stdin. Read the data from Stdout and stderr until it reaches the end of the file. Wait for the process to finish
I think that when ArcGIS runs your script that stdin
is not connected and causes the script to be excluded for some reason Is formed.
No comments:
Post a Comment