From: W. eWatson on
On 2/23/2010 11:14 AM, Gib Bogle wrote:
> W. eWatson wrote:
>> On 2/23/2010 8:26 AM, Rick Dooling wrote:
>>> No telling what Windows will do. :)
>>>
>>> I am a mere hobbyist programmer, but I think real programmers will
>>> tell you that it is a bad habit to use relative paths. Use absolute
>>> paths instead and remove all doubt.
>>>
>>> http://docs.python.org/library/os.path.html
>>>
>>> RD
>> You may be right. The actual 300 line program just reads the folder
>> without specifying any path. I'm not that familiar with os path, but
>> have seen it used.
>
> How do you invoke the program? Do you use a Command Prompt window?
IDLE, but I'm prett sure I tried it (300 lines) with Cprompt.
From: Gib Bogle on
W. eWatson wrote:
> On 2/23/2010 11:14 AM, Gib Bogle wrote:
>> W. eWatson wrote:
>>> On 2/23/2010 8:26 AM, Rick Dooling wrote:
>>>> No telling what Windows will do. :)
>>>>
>>>> I am a mere hobbyist programmer, but I think real programmers will
>>>> tell you that it is a bad habit to use relative paths. Use absolute
>>>> paths instead and remove all doubt.
>>>>
>>>> http://docs.python.org/library/os.path.html
>>>>
>>>> RD
>>> You may be right. The actual 300 line program just reads the folder
>>> without specifying any path. I'm not that familiar with os path, but
>>> have seen it used.
>>
>> How do you invoke the program? Do you use a Command Prompt window?
> IDLE, but I'm prett sure I tried it (300 lines) with Cprompt.

I don't know what you mean by "300 lines". Have you opened a Command Prompt
window, changed to the directory where you copied the files, and executed:
python your_prog.py
?
From: Aahz on
In article <hm0jn4$tnf$1(a)news.eternal-september.org>,
W. eWatson <wolftracks(a)invalid.com> wrote:
>
>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 this, and let me know what
>they find.
>
>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.

I've no time to verify your specific claim and have no readily available
proof for mine, but I've seen similar issues on Win7. AFAIK, this has
nothing to do with Python.
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer
From: Rick Dooling on
On Feb 23, 1:08 pm, Gib Bogle <g.bo...(a)auckland.no.spam.ac.nz> wrote:

> It isn't useful to respond to a serious question with OS bigotry.

Okay, I'll go with what Aahz said:

> I've seen similar issues on Win7.
> AFAIK, this has nothing to do with Python.
From: W. eWatson on
On 2/23/2010 6:04 PM, Aahz wrote:
> In article<hm0jn4$tnf$1(a)news.eternal-september.org>,
> W. eWatson<wolftracks(a)invalid.com> wrote:
>>
>> 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 this, and let me know what
>> they find.
>>
>> 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.
>
> I've no time to verify your specific claim and have no readily available
> proof for mine, but I've seen similar issues on Win7. AFAIK, this has
> nothing to do with Python.
I've been away for several days and have no idea if anyone above figured
this out. Likely not,since your post is at the end.

Interesting about 'similar'. I'm pretty much done exploring every nook
and cranny on this problem. It can be worked around. I will say that if
I look at the properties of the copied file, it shows a shortcut tab
that leads back to the original file. I have no recollection of making a
shortcut, and always use Copy and Paste. Further, if I do create
shortcut in W7, it adds "-shortcut to the file suffix. I do not ever
recall seeing that anywhere. I just tried it in XP, and it puts it in
front of the name.