Select to view content in your preferred language

How do you call a Script from a Script????

3275
11
03-30-2011 10:31 AM
AaronPaul
Deactivated User
I'm creating what I call a "Script Manager" that will fire a script based on product type.
So, if the user inputs Aerial or Radius, the appropriate script is ran.

I can get this to run using os.system('python C:\Sample.py' + parameter variables)
The problem with this is the script is run through python window.

I've been told it is more effective to use an import statement, something like this:
if Product == "Aerial":
      import ("C:\Sample.py")

What am I missing???
Tags (2)
0 Kudos
11 Replies
AndresCastillo
MVP Alum

This Esri documentation may be of use in this topic as well:

Extending geoprocessing through Python modules—Geoprocessing and Python | Documentation 

0 Kudos
DanPatterson_Retired
MVP Emeritus

This thread is 9 years old Andres Castillo‌ python 3 had only been out for less than a year

0 Kudos