Timeline for Getting print statements in Python script to print through a batch file
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 1, 2017 at 4:30 | history | edited | Midavalo♦ | CC BY-SA 3.0 |
formatting
|
Sep 19, 2011 at 21:13 | comment | added | Patty Jula | OK, I removed the @ECHO OFF from my .bat file and inserted "-u" as you suggested. I also modified my script so the arcpy.AddMessage was commented out and inserted my print line. The batch file ran and my print statement displayed. Now I know two ways of printing statements in command line. Thank you. | |
Sep 19, 2011 at 11:14 | comment | added | Sideshow Bob |
Glad that helped, still weird that print doesn't work. Have you tried removing the @ECHO OFF line and calling your script with the -u argument: C:\Python26\ArcGIS10.0\python.exe -u C:\project\python\myScript.py Kind of stabs in the dark but I have similar batch scripts and it works for me...
|
|
Sep 16, 2011 at 14:53 | vote | accept | Patty Jula | ||
Sep 16, 2011 at 14:52 | comment | added | Patty Jula | Ah, thank you. I put an arcpy.AddMessage in my Python script and got that statement to print the matchCount when I ran the batch file. Below is my batch file if you were curious. Thanks again. @ECHO OFF REM Runs myScript.py C:\Python26\ArcGIS10.0\python.exe C:\project\python\myScript.py ECHO Ran myScript.py PAUSE | |
Sep 16, 2011 at 9:46 | history | answered | Sideshow Bob | CC BY-SA 3.0 |