File modifications

aditya shukla adityashukla1983 at gmail.com
Sat Sep 27 22:44:19 CEST 2008


Hello folks ,

I have a file like this

/T_0_size=105((-bin-ulockmgr_server:0.99[&&NHX:C=0.195.0],(((-bin-hostname:0.00
[&&NHX:C=200.0.0],
(-bin-dnsdomainname:0.00[&&NHX:C=200.0.0],(-bin-domainname:0.00[&&NHX:C=200.0.0],(-bin-nisdomainname:0.00[&&NHX:C=200.0.0],-bin-ypdomainname:0.00[&&NHX:C=200.0.0]):0.00):0.00):0.00):0.98

,(-bin-iptables-xml:0.97[&&NHX:C=0.183.0],(-bin-dbus-send:0.78[&&NHX:C=0.94.0],-bin-dbus-monitor:0.78[&&NHX:C=0.94.0]):0.97):0.98):0.99.

I wanna get the file in this format

((-bin-ulockmgr_server:0.99,(((-bin-hostname:0.00,(-bin-dnsdomainname:0.00,(-bin-domainname:0.00,(-bin-nisdomainname:0.00,-bin-ypdomainname:0.00):0.00):0.00):0.00):0.98

,(-bin-iptables-xml:0.97,(-bin-dbus-send:0.78,-bin-dbus-monitor:0.78):0.97):0.98):0.99

ie , remove /T_0_size , [&&NHC:C=0.195.0] , [&&NHX:C=200.0.0] and so  on ,
how should i handle this after reading the file?

Thanks


Aditya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20080927/b16f31a5/attachment.html>


More information about the Python-list mailing list