Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

wlst ls() no print

 
Michael Drona
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a way to make wlst's ls() return a list and then not print the results also?

I found ls(returnMap='true') but the problem is that it does like


I want to supress that first dr-- junk so that I can format the output like I want to see it from my script. I can do my own "for b in a: print" or whatever I want to do.
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have not used ls() before. But if I find some spare time, I ll try and give you an answer. Perhaps there is some one here that already knows the answer to your question.
 
Pavan BhavaniShekhar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear WLAs,

my blog might be helpful for accessing python list in WLST.

JMS monitoring using WLST


 
Alex Barrios
Greenhorn
Posts: 1
Mac Oracle Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Drona wrote:Is there a way to make wlst's ls() return a list and then not print the results also?

I found ls(returnMap='true') but the problem is that it does like


I want to supress that first dr-- junk so that I can format the output like I want to see it from my script. I can do my own "for b in a: print" or whatever I want to do.


Hi Mickeal,

Try surrounded the ls statement with 'redirect' to suppress the unwanted output of the ls statement.
 
Abhinav Sonkar
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The ls() command is meant to be used in interactive mode only and not in scripts in general. You can use cmo.getDestinations() to get the list of destinations.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic