reading in a string

emile at fenx.com emile at fenx.com
Wed May 17 09:48:34 EDT 2000


I've got a feeling you're getting tripped up
parsing and passing on the names to the next
command you want done.

Pare down your code to a sub-set that exhibits
the problem, then post it and we can help better.

Emile van Sebille
emile at fenx.com

<ghost_man at my-deja.com> wrote in message
news:<8ft1rq$pgb$1 at nnrp1.deja.com>...
> I am writing a python script that through the
> os.system command calls VSS and imports the files
> over. I then run
> os.system('dir /s >> myfile.txt')
> 
> I want to be able to read in the contents of the
> file one line at a time and execute some command
> on it.  My problem is when the file is something
> like C:\program files\python\temporary   Python
> reads it as c:\program files\python\011emporary
> 
> I am getting tripped up by the \t switch.  I
> cannot at this point and time run string.replace
> because it has already been converted over.  Any
> ideas how I can read the string in correctly?  I
> have explored the glob module and it would seem
> very cumbersome to try and cover this.  Is there
> an easier way to read in the contents of my file
> and have them import correctly?
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.
> -- 
> http://www.python.org/mailman/listinfo/python-list
>




More information about the Python-list mailing list