What's Going on between (Verify) Python and win7?

Tim Roberts timr at probo.com
Thu Feb 25 00:44:32 EST 2010


"W. eWatson" <wolftracks at invalid.com> wrote:

>Maybe someone could verify my result?
>
>open file
>read file line
>print line
>close file
>
>data 1234
>
>Execute it in a folder
>
>Create another folder and copy the program to it.
>put in a new data file as
>
>data 4567
>
>Execute the copied program
>Does it give
>data1234?

No, of course not.

  C:\tmp\x>echo data 1234>data.txt

  C:\tmp\x>type check.py
  f = open('data.txt','r')
  print f.read()
  f.close()

  C:\tmp\x>check.py
  data 1234

  C:\tmp\x>cd ..\y

  C:\tmp\y>echo data 4567>data.txt

  C:\tmp\y>copy ..\x\check.py .
          1 file(s) copied.

  C:\tmp\y>check.py
  data 4567

  C:\tmp\y>

Would you like to post your exact code?
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list