reading in a string

emile at emile at
Wed May 17 15:48:34 CEST 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

<ghost_man at> wrote in message
news:<8ft1rq$pgb$1 at>...
> 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
> Before you buy.
> -- 

More information about the Python-list mailing list