text file

Lie Ryan lie.1296 at gmail.com
Wed Oct 1 12:52:34 EDT 2008


On Wed, 01 Oct 2008 07:19:44 -0700, yqyq22 wrote:
> My problem is how to translate this vbs in python:
> 
> Dim fso
> Dim strComputer
> Set fso = CreateObject("Scripting.FileSystemObject") Set ElencoPC =
> fso.OpenTextFile("elencoPC.txt" , 1, False) Do Until
> ElencoPC.AtEndOfStream
> strComputer = ElencoPC.ReadLine
> 
> thanks

try this:

fso = open('elencoPC.txt', 'r')
for line in f:
    strComputer = line





More information about the Python-list mailing list