A few days ago I posted a message titled ""Two" Card Monty. The problem I mentioned looks legitimate, and remains puzzling. I've probed this in a newsgroup, and no one has an explanation that fits.

My claim is that if one creates a program in a folder that reads a file in the folder it and then copies it to another folder, it will read the data file in the first folder, and not a changed file in the new folder. I'd appreciate it if some w7 users could try the program below, and let me know what they find. I'm using IDLE in Win7 with Py 2.5.

My experience is that if one checks the properties of the copied file, it will point to the original py file and execute it and not the copy. If win7 is the culprit, I would think this is a somewhat serious problem. It may be the sample program is not representative of the larger program that has me stuck. If necessary I can provide it. It uses common modules. (Could this be something like the namespace usage of variables that share a common value?)

# Test program. Examine strange link in Python under Win7
# when copying py file to another folder.
# Call the program vefifywin7.py
# To verify my situation use IDLE, save and run this program there.
# Put this program into a folder along with a data file
# called verify.txt. Create a single text line with a few characters in it
# Run this program and note the output
# Copy the program and txt file to another folder
# Change the contents of the txt file
# Run it again, and see if the output is the same as in the other folder
track_file = open("verify.txt")
aline = track_file.readline();
print aline
track_file.close()

--
            "There is nothing so annoying as to have two people
             talking when you're busy interrupting." -- Mark Twain

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to