Wrapping around a list

2013-11-27 Thread amjadcsu
Hello, I am working on a problem (Bioinformatics domain) where all possible combinations of input string needs to be printed as sublist For example: Input string : "LEQN" Output= "[L","E","Q","N"]["LE","EQ","QN","NL"] ["LEQ","EQN","QNE","NLE"] ["LEQN"] The code i have written for this is as foll

Re: capturing output of command line in an array

2007-10-31 Thread amjadcsu
thanks Lee, I would just like to get the "node" in that list. so it would be something like this alist=[node13,node12,node8,node2,node1.] I dont want the whole info is it possible?? On Oct 31, 9:44 am, Lee Capps <[EMAIL PROTECTED]> wrote: > On Oct 31, 2007, at 11:01 AM, [EMAIL PROTECTED] wrot

Re: capturing output of command line in an array

2007-10-31 Thread amjadcsu
Thanks Lee I am looking to just get the node name from that info. I dont need all other info so my list would be just alist=[node13,node12,node8,node1 ] is it possible?? On Oct 31, 9:44 am, Lee Capps <[EMAIL PROTECTED]> wrote: > On Oct 31, 2007, at 11:01 AM, [EMAIL PROTECTED] wrote: > > > > >

capturing output of command line in an array

2007-10-31 Thread amjadcsu
Hi I am trying to execute a command using os.system. this command lists the number of nodes alive in a cluster. I would like to capture the output in list/array in python. IS it possible.?/ Here is my command gstat -a node13 2 (0/ 56) [ 0.00, 0.00, 0.00] [ 0.0, 0.0, 0.1, 99.9,

Arp request to get MAc Adress with IP address

2007-10-30 Thread amjadcsu
Hello, I have a network on same subnet. I have an ip address of a machine. but i need to get its MAC Adress. Sendingf ARP request is the way i am taking. IS there any other way to get this MAC Adress in python.?? Also does python go down to level 2 of TCP/IP model?? Sorry if i am to naive. Just

Re: Parsing xml file in python

2007-10-30 Thread amjadcsu
That XML is just a snapshot I am not getting into the xml parser. The error is not generated but also the /root/yhpc-2.0/ganglia.txt does not contain anything. On Oct 30, 12:32 pm, "Diez B. Roggisch" <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] schrieb: > > > > > I am a newbie in python > > I

Parsing xml file in python

2007-10-30 Thread amjadcsu
I am a newbie in python I am trying to parse a xml file and write its content in a txt file. The txt contains null elements. Any reason what iam doing wrong here Here is the code that i wrote import sys,os import xml.sax import xml.sax.handler from xml.sax.handler import ContentHandler from xml