1

I am new to scripting and programing in general. I am trying to run WebSphere command line tool, wsadmin, and it keeps failing. I am looking for answers for 2 questions about the following code:


**import sys
import os
import re
execfile('wsadminlib.py')
appName = sys.argv[1]
configLocation = "/location/of/config/"
config_prop = open(configLocation + appName+"-Config.csv", "r")

for line in config_prop:
    line = line.split(",")
    print line**

I launch run the scripts in as wsadmin and from the command line is as follows:

>>>>./wsadmin.sh -lang jython -f deploy.sh param1

Questions:

  1. The problem is that it fails on the "for line in config_prop" with AttributeError: getitem?
  2. when I run this through python on the same machine, the code works. Just not when I run it through wsadmin tool?
  3. Is there other ways to extract data from txt or csv with comma delimited and setting a variable for each word that is only one line long.
Zabuzard
  • 25,064
  • 8
  • 58
  • 82

1 Answers1

0

Issue has been resolved. the libraries used is 2.1 and the syntax i was using was post 2.2.