Pass Parameters needed for Toolbox using Python

Discussion created by vamulapa on Jul 2, 2014
I am looking to get parameters from toolbox script that is existing. Once i have the parameters, i want to be able to pass the values from python script. I open the toolbox from Arcmap and pass the parameters from there. But instead i would like to do it from python script.

From python, I have imported the toolbox(pointing to where toolbox exists in my local) as below:

import arcpy
import os
import sys
# name of toolbox without tbx extension
toolboxName = "a_Toolbox"
__file__ = 'C:\\Users\\$user\\Desktop\\ARCGIS\\'
# create string with path to toolbox
toolboxPath = os.path.join(os.path.dirname(__file__), toolboxName + ".tbx")
print toolboxPath

I have looked into the toolbox parameters and it has 4 parameters with data types as folder, multiple value, feature layer and string.