whitespace again

david brochu jr brochu121 at gmail.com
Thu Apr 13 17:37:27 EDT 2006


hello again,

still having problems....i have the following in a txt file:


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\software\compete\dca]
"UserId"="92005851"
"PanelId"="mayflower"
"PanelName"="Consumer Input Toolbar"
"CaptureType"=dword:00000002
"CapTypOvr"=dword:00000001
"ExePath"="C:\\Program Files\\Consumer Input
Toolbar\\ConsumerInputToolbar.exe"
"DcaVer"=dword:00000640
"DcaUpdateVer"=dword:00000640
"CfgVer"=dword:00000640
"RulesVer"=dword:00000008
"UaCheck"=dword:0000005a
"Survey"=dword:00000001
"ErrWaitMin"=dword:00000001
"ErrWaitMax"=dword:00000002
"KeepAlive"=dword:00000001
"PerfEnabled"=dword:00000000
"PerfPath"="http://www.consumerinput.com.edgesuite.net/speedera/10k2.txt"

I want to remove the "  found at the beginning of each line. When I use:

for line in new_line.readlines():
 line = re.sub('"',"",line)
 print line

I get:

i n d o w s   R e g i s t r y   E d i t o r   V e r s i o n   5 . 0 0




H K E Y _ L O C A L _ M A C H I N E \ s o f t w a r e \ c o m p e t e \ d c
a ]


U s e r I d " = " 9 2 0 0 5 8 5 1 "


P a n e l I d " = " m a y f l o w e r "


P a n e l N a m e " = " C o n s u m e r   I n p u t   T o o l b a r "


C a p t u r e T y p e " = d w o r d : 0 0 0 0 0 0 0 2


C a p T y p O v r " = d w o r d : 0 0 0 0 0 0 0 1


E x e P a t h " = " C : \ \ P r o g r a m   F i l e s \ \ C o n s u m e r
I n p u t   T o o l b a r \ \ C o n s u m e r I n p u t T o o l b a r . e x
e "


D c a V e r " = d w o r d : 0 0 0 0 0 6 4 0


D c a U p d a t e V e r " = d w o r d : 0 0 0 0 0 6 4 0


etc etc...Too much space...how do i get the same output with all the
space..this is killing me please help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060413/13cd3dd6/attachment.html>


More information about the Python-list mailing list