Sponsored Content
Top Forums Shell Programming and Scripting Question about Strings in Python Post 302973430 by mohtashims on Tuesday 17th of May 2016 04:30:21 PM
Old 05-17-2016
Question about Strings in Python

Hi,

I get he values for nmval=MS1 & csval=Cluster from the properties file like below.

Code:
nmval=configProps.get("SVR_NAME")
csval=configProps.get("CLS_NAME")

What should i do in the commands below so as to use the variables nmval and csval instead of manually typing MS1 and Cluster

Quote:
cd('/Servers/MS1')
cmo.setCluster(getMBean('/Cluster/TestCluster'))
I want to use variables in the above two lines instead of values.Please help.
 

10 More Discussions You Might Find Interesting

1. Programming

NEWBIE QUESTION: python 3 or 2.6.x

I'm a newbie and want to learn a programming language, willy-nilly I picked python... Should I go with 2.6.x which at first glance seems extremely well documented, or should I go with 3.0, which is new and shiny?! I want...no...I'm going to NEED fantastic documentation or I'm going to fail... (2 Replies)
Discussion started by: guptaxpn
2 Replies

2. Shell Programming and Scripting

Python Newbie Question Regex

I starting teaching myself python and am stuck on trying to understand why I am not getting the output that I want. Long story short, I am using PDB for debugging and here my function in which I am having my issue: import re ... ... ... def find_all_flvs(url): soup =... (1 Reply)
Discussion started by: metallica1973
1 Replies

3. Programming

General question about learning Python

I am planning on taking a class in Python. My choices are 2.5 or 3.0. Which version should I choose? I am getting the impression they are two separate paths. thanks. (5 Replies)
Discussion started by: djehresmann
5 Replies

4. Shell Programming and Scripting

Searching for a list of strings in a file with Python

Hi guys, I'm trying to search for several strings, which I have in a .txt file line by line, on another file. So the idea is, take input.txt and search for each line in that file in another file, let's call it rules.txt. So far, I've been able to do this, to search for individual strings: ... (1 Reply)
Discussion started by: starriol
1 Replies

5. UNIX for Dummies Questions & Answers

Capslock and Python Question

Hello All, I was looking for a solution for enabling/disabling the Capslock from the command line and came across some Python code for doing just that... Well, in this case the code was written to ONLY turn-off Capslock but I assume there has to be a way to turn it on too. Site where I... (0 Replies)
Discussion started by: mrm5102
0 Replies

6. Shell Programming and Scripting

Python question

#!/usr/bin/python def genCommanString(s): print s abc = { "sftp":genCommanString('f5sftp'), "/usr/local/ssh/bin/sftp": genCommanString('f5sftp') } value="sftp" xyz = abc.get(value) Why the above coding produce 2 row output? (i.e. f5sftp f5sftp) Is it... (1 Reply)
Discussion started by: cstsang
1 Replies

7. Programming

A straightforward Python question.

Hi all... Simple yes or no answer question for the big guns with a qualifier if YES. I can possibly do FFT for my needs in AudioScope using python. Q: Is python now considered part of the /usr/bin or other command paths for ALL current *NIX style OSes? IF YES which version(s) should I... (4 Replies)
Discussion started by: wisecracker
4 Replies

8. Programming

Python p.ravel question

Hi, I'm trying to decipher some python code located here: Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy * GitHub I'm unable to understand what line 75 is doing? ix = np.random.choice(range(vocab_size), p=p.ravel()) Anyone know what this... (2 Replies)
Discussion started by: 1Brajesh
2 Replies

9. Shell Programming and Scripting

Simple Python Code Question

I have the following code: #!/usr/bin/env python mylist = def printWithoutNewlines(): for objects in mylist: #print(objects) objects = objects.replace('hello', "hi") print objects When executed, it gives the following output: ## ./loop.py hi... (3 Replies)
Discussion started by: SkySmart
3 Replies

10. Programming

Python or Shell script to Grep strings from input file and output in csv format

Hi Experts, I am writing a python script to grep string from file and display output in csv file as in attached screenshot https://drive.google.com/file/d/1gfUUdfmQma33tz65NskThYDhkZUGQO0H/view Input file(result_EPFT_config_device) Below is the python script i have prepared as of... (1 Reply)
Discussion started by: as7951
1 Replies
scconf_transp_adap_ibd(1M)				  System Administration Commands				scconf_transp_adap_ibd(1M)

NAME
scconf_transp_adap_ibd - configure the InfiniBand (ibd) transport adapter DESCRIPTION
Note - Beginning with the Sun Cluster 3.2 release, Sun Cluster software includes an object-oriented command set. Although Sun Cluster software still supports the original command set, Sun Cluster procedural documentation uses only the object-oriented command set. For more infor- mation about the object-oriented command set, see the Intro(1CL) man page. You can configure ibd adapters as cluster transport adapters. These adapters can only be used with transport type dlpi. The ibd adapter connects to an InfiniBand transport switch. The connection is made through a transport cable. When the endpoints of the transport cable are configured by using scconf, scinstall, or other tools, you are asked to specify a port name on the transport switch. You can provide any port name, or accept the default, as long as the name is unique for the switch. The default is to set the port name to the node ID that hosts the adapter at the other end of the cable. There are no user-configurable properties for cluster transport adapters of this type. SEE ALSO
Intro(1CL), clinterconnect(1CL), clnode(1CL), scconf(1M), scconf_transp_jct_ibswitch(1M), scinstall(1M), ibd(7D) Sun Cluster 3.2 4 May 2006 scconf_transp_adap_ibd(1M)
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy