<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Calling Other Programs into Python for Processing? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417985#M32836</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm actually trying to understand the arguments. The syntax on docs.python is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;subprocess.call(*popenargs, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The arguments are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;args should be a string, or a sequence of program arguments. The program to execute is normally the first item in the args sequence or the string if a string is given, but can be explicitly set by using the executable argument. &lt;STRONG&gt;When executable is given, the first item in the args sequence is still treated by most programs as the command name, which can then be different from the actual executable name&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what it means by this bolded section. In the location of the rpl file, there aren't any other files. There is no .exe file (I've made hidden files and folders visible) Is the .rpl file considered an executable as well? Should it recognize the .exe extension even though it doesn't seem to have one? I apologize if the .rpl file isn't something you all are aware of....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2011 18:57:59 GMT</pubDate>
    <dc:creator>MikeMacRae</dc:creator>
    <dc:date>2011-06-23T18:57:59Z</dc:date>
    <item>
      <title>Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417978#M32829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am at a stage with Python where I would like to explore using it with other applications. In my case, I am automating a number of maps and editing layers and feature classes in the process. Before I started doing this stuff through python, I had a number of manual processes. One of which is to use an .rpl program (find and replace program) when updating metadata .xml's in order to import them into my feature class metadata. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is, can I set a code block in python, to call the .rpl program (or any other program for that matter) to do some processing while my script runs? I hope this makes sense....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'd like my whole python script basically do this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Make some changes in my .mxd &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Make some changes in some feature classes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Update my xml files by calling in the .rpl file to do this for me&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 15:57:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417978#M32829</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T15:57:56Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417979#M32830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use subprocess.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import subprocess&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;subprocess.call(['rplrunner.exe', r'c:\path\to\my.rpl'])&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 16:16:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417979#M32830</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-06-23T16:16:19Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417980#M32831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the response Jason. This will rock my python world if I can get it to work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the subprocess command you posted and implemented my own file and path. I am getting an error using traceback. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import subprocess

subprocess.call(['RunMetadata.exe', r'Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.rpl'])
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;PYTHON ERRORS:&lt;BR /&gt;Traceback info:&lt;BR /&gt;&amp;nbsp; File "Z:/ESRI/Python/Test Scripts/SubProcess.py", line 9, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.call(['RunMetadata.exe', r'Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.rpl'])&lt;BR /&gt;&lt;BR /&gt;Error Info:&lt;BR /&gt;[Error 2] The system cannot find the file specified&lt;BR /&gt;&lt;BR /&gt;ArcPy ERRORS:&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any reason why it can't find the specified file? I tried replacing .exe with .rpl, but the same erro comes up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:54:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417980#M32831</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2021-12-11T18:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417981#M32832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Either fully qualify the path to the executable you want to run, put it in your Windows PATH environment variable, or change the current working directory in Python to the directory containing the executable using os.chdir(). The first method is probably the easiest.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 16:59:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417981#M32832</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-06-23T16:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417982#M32833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Logan. I have fully qualified the path like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
subprocess.call(['Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.rpl', r'Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.rpl'])
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The error I am getting now is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;PYTHON ERRORS:&lt;BR /&gt;Traceback info:&lt;BR /&gt;&amp;nbsp; File "Z:/ESRI/Python/Test Scripts/SubProcess.py", line 9, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.call([r'Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.rpl', r'Z:\ESRI\IOR_Run_Metadata_2009\RunMetadata.exe'])&lt;BR /&gt;&lt;BR /&gt;Error Info:&lt;BR /&gt;[Error 193] %1 is not a valid Win32 application&lt;BR /&gt;&lt;BR /&gt;ArcPy ERRORS:&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does this mean that win32 will not recognize the application? Is there a way to make it do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:54:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417982#M32833</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2021-12-11T18:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417983#M32834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Switch the two arguments, put the .exe first.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 18:31:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417983#M32834</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-06-23T18:31:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417984#M32835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oops, looks like I posted the second error I got with the first script I tried. I've tried a combination of .exe and .rpl (ie make both paths contain .exe/.rpl or a combination of both) I seem to be getting this same error with every attempt.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 18:43:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417984#M32835</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T18:43:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417985#M32836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm actually trying to understand the arguments. The syntax on docs.python is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;subprocess.call(*popenargs, **kwargs)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The arguments are:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;args should be a string, or a sequence of program arguments. The program to execute is normally the first item in the args sequence or the string if a string is given, but can be explicitly set by using the executable argument. &lt;STRONG&gt;When executable is given, the first item in the args sequence is still treated by most programs as the command name, which can then be different from the actual executable name&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure what it means by this bolded section. In the location of the rpl file, there aren't any other files. There is no .exe file (I've made hidden files and folders visible) Is the .rpl file considered an executable as well? Should it recognize the .exe extension even though it doesn't seem to have one? I apologize if the .rpl file isn't something you all are aware of....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 18:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417985#M32836</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T18:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417986#M32837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What is the executable associated with .rpl files? That is what you should be calling as your first argument, and the .rpl file your second argument. Alternatively, use &lt;/SPAN&gt;&lt;A href="http://docs.python.org/release/2.6.5/library/os.html#os.startfile"&gt;os.startfile()&lt;/A&gt;&lt;SPAN&gt; to run the .rpl file using the default associated program (akin to double-clicking the file in Windows).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 19:18:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417986#M32837</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-06-23T19:18:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417987#M32838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, I'll try to reword what it is I am doing. The .rpl is the program itself ( I probably should have mentioned this is the program I am using instead of refering to it as a file). It is an interface that allows me to find and replace tags with values in .xml files which I want to import into feature classes later on. The .rpl is the executable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm thinking that if I interpret what you have said, Logan, is that my first argument should be the location of the program I want to call (or open) and the second argument should be the file or files that I want to run it against (ie the .xml)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Basically my current process is this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. open the .rpl program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. enter the information that I need to edit (ie user name, dates, project site name, email address, etc...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Run that against 12 template .xml files which finds tags and string variables and replaces them with the information I entered into the .rpl program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Import .xml into the metadata to the matching feature class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;5. Fin&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this makes it a little more clearer as to my process and end result.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 19:45:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417987#M32838</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T19:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417988#M32839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Actually, the os.startfile() runs pretty cool. It might be more of what I am looking to do. I'm thinking it might take a little more than my abilities to make this program run in the background the way I would like. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My thought process now is maybe just to prompt the script to run like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Run my python script and let it process my maps, layers, etc&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. When the script gets to the block to os.startfile(my.rpl program), the .rpl opens and in the same breath, pauses the python program&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. allow user to enter the information in the .rpl program and run it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. when they close the .rpl program, the rest of the python script continues on&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see some syntaxes like os.wait() that may pause the python script, maybe something like os.when_program_closes_continue_python....just reaching at straws now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 20:07:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417988#M32839</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T20:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417989#M32840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sorry, I'll try to reword what it is I am doing. The .rpl is the program itself ( I probably should have mentioned this is the program I am using instead of refering to it as a file). It is an interface that allows me to find and replace tags in with values .xml files which I want to import into feature classes later on. The .rpl is the executable.&lt;BR /&gt;&lt;BR /&gt;I'm thinking that if I interpret what you have said, Logan, is that my first argument should be the location of the program I want to call (or open) and the second argument should be the file or files that I want to run it against (ie the .xml)? &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Basically my current process is this:&lt;BR /&gt;&lt;BR /&gt;1. open the .rpl program&lt;BR /&gt;2. enter the information that I need to edit (ie user name, dates, project site name, email address, etc...)&lt;BR /&gt;3. Run that against 12 template .xml files which finds tags and string variables and replaces them with the information I entered into the .rpl program&lt;BR /&gt;4. Import .xml into the metadata to the matching feature class.&lt;BR /&gt;5. Fin&lt;BR /&gt;&lt;BR /&gt;I hope this makes it a little more clearer as to my process and end result.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That sounds correct but I have not heard of this .rpl program and couldn't say how it should be called on the command line. But to me it still sounds like the .rpl is a file that is run by some other executable you have not specified as of yet.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Actually, the os.startfile() runs pretty cool. It might be more of what I am looking to do. I'm thinking it might take a little more than my abilities to make this program run in the background the way I would like. &lt;BR /&gt;&lt;BR /&gt;My thought process now is maybe just to prompt the script to run like this:&lt;BR /&gt;&lt;BR /&gt;1. Run my python script and let it process my maps, layers, etc&lt;BR /&gt;2. When the script gets to the block to os.startfile(my.rpl program), the .rpl opens and in the same breath, pauses the python program&lt;BR /&gt;3. allow user to enter the information in the .rpl program and run it.&lt;BR /&gt;4. when they close the .rpl program, the rest of the python script continues on&lt;BR /&gt;&lt;BR /&gt;I see some syntaxes like os.wait() that may pause the python script, maybe something like os.when_program_closes_continue_python....just reaching at straws now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Using subprocess.call() should pause the script until the called process terminates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 20:15:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417989#M32840</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-06-23T20:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417990#M32841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;That sounds correct but I have not heard of this .rpl program and couldn't say how it should be called on the command line. But to me it still sounds like the .rpl is a file that is run by some other executable you have not specified as of yet.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Using subprocess.call() should pause the script until the called process terminates.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wow, this is a sharp learning curve. Logan, the .rpl program was copied to a folder on my network drive. I've always accessed it from there, but the folder it sits in did not include the executable. I didn't know where to find it so I re-downloaded the program from the internet which gave me all the associated files (including the executable)....lesson learned. I set up the subroutine as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
subprocess.call(['C:\Downloads\Multiple File Search Replace\REPLACE.exe','C:\Downloads\Multiple File Search Replace\Noname.rpl'])
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I threw it into my existing python script and it runs like a thing of beauty. It calls the .rpl program (and pauses the rest of my python script), allows me to monkey around with it and when I close the program, the rest of the python runs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Much thanks for everyones help. I have no doubt this will open a can of new questions at some point!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 18:54:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417990#M32841</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2021-12-11T18:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417991#M32842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cool, glad you got it working. I think the next logical step would be doing the XML modifications directly in Python -- for this you might take a look at &lt;/SPAN&gt;&lt;A href="http://docs.python.org/release/2.6.5/library/xml.etree.elementtree.html"&gt;xml.etree.ElementTree&lt;/A&gt;&lt;SPAN&gt; (built-in) or &lt;/SPAN&gt;&lt;A href="http://lxml.de/tutorial.html"&gt;lxml.etree&lt;/A&gt;&lt;SPAN&gt; (3rd party).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 21:08:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417991#M32842</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-06-23T21:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calling Other Programs into Python for Processing?</title>
      <link>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417992#M32843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks again Logan. I actually stumbled across this module in my tour of the internet today. It has some functions and classes that may eventually replace the subroutine and .rpl program.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 21:25:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/calling-other-programs-into-python-for-processing/m-p/417992#M32843</guid>
      <dc:creator>MikeMacRae</dc:creator>
      <dc:date>2011-06-23T21:25:36Z</dc:date>
    </item>
  </channel>
</rss>

