What's Going on between Python and win7?

W

W. eWatson

Last night I copied a program from folder A to folder B. It inspects the
contents of files in a folder. When I ran it in B, it gave the results
for A! Out of frustration I changed the name in A, and fired up the
program in B. Win7 went into search mode for the file. I looked at
properties for the B program, and it was clearly pointing to folder A.

Anyone have this happen to them?

Another anomaly. I have the files track.py and trackstudy.py in the same
folder along with 100 or so other py and txt data files. When I did a
search from the folder window in the upper right corner, search only
found one of the two. I called HP tech support about it, and they could
see it for themselves via remote control. They had no idea, but agreed
to contact MS. In this case, I noted that this search box has some sort
of filter associated with it. Possibly, in my early stages of learning
to navigate in Win7, I accidentally set the filter.

Comments?
 
K

Krister Svanlund

Last night I copied a program from folder A to folder B. It inspects the
contents of files in a folder. When I ran it in B, it gave the results for
A! Out of frustration I changed the name in A, and fired up the program in
B. Win7 went into search mode for the file. I looked at properties for the B
program, and it was clearly pointing to folder A.

Anyone have this happen to them?

Another anomaly. I have the files track.py and trackstudy.py in the same
folder along with 100 or so other py and txt data files. When I did a search
from the folder window in the upper right corner, search only found one of
the two. I called HP tech support about it, and they could see it for
themselves via remote control. They had no idea, but agreed to  contact MS.
In this case, I noted that this search box has some sort of filter
associated with it. Possibly, in my early stages of learning to navigate in
Win7, I accidentally set the filter.

Comments?

I can't really see the python related problem here...
 
M

MRAB

W. eWatson said:
Last night I copied a program from folder A to folder B. It inspects the
contents of files in a folder. When I ran it in B, it gave the results
for A! Out of frustration I changed the name in A, and fired up the
program in B. Win7 went into search mode for the file. I looked at
properties for the B program, and it was clearly pointing to folder A.
Sounds like you didn't copy it but made a shortcut to it instead.
Anyone have this happen to them?

Another anomaly. I have the files track.py and trackstudy.py in the same
folder along with 100 or so other py and txt data files. When I did a
search from the folder window in the upper right corner, search only
found one of the two. I called HP tech support about it, and they could
see it for themselves via remote control. They had no idea, but agreed
to contact MS. In this case, I noted that this search box has some sort
of filter associated with it. Possibly, in my early stages of learning
to navigate in Win7, I accidentally set the filter.

Comments?

Not Python-related.
 
W

W. eWatson

Last night I copied a program from folder A to folder B.

[tail of various windows breakages elided]
Comments?

Switch to Linux?

Or at least install Cygwin?
Yes, definitely not related, but maybe some W7 user has a similar
experience here. It seems a natural place to look, since it should be
reasonably common.

I have Cygwin.
 
W

W. eWatson

So what's the bottom line? This link notion is completely at odds with
XP, and produces what I would call something of a mess to the unwary
Python/W7 user. Is there a simple solution?

How do I get out of this pickle? I just want to duplicate the program
in another folder, and not link to an ancestor.
 
A

Alf P. Steinbach

* W. eWatson:
So what's the bottom line? This link notion is completely at odds with
XP,

Well, Windows NT has always had *hardlinks*. <g>

I found it a bit baffling that that functionality is documented as not
implemented for Windows in the Python standard library.

But OK, it was non-trivial to do prior to Windows 2000; you had to sort of hack
it using the backup APIs since the functionality was not exposed through the
ordinary file APIs.


and produces what I would call something of a mess to the unwary
Python/W7 user. Is there a simple solution?

How do I get out of this pickle? I just want to duplicate the program
in another folder, and not link to an ancestor.

Copy and paste.


Cheers & hth.,

- Alf
 
W

W. eWatson

* W. eWatson:

Well, Windows NT has always had *hardlinks*. <g>

I found it a bit baffling that that functionality is documented as not
implemented for Windows in the Python standard library.

But OK, it was non-trivial to do prior to Windows 2000; you had to sort
of hack it using the backup APIs since the functionality was not exposed
through the ordinary file APIs.




Copy and paste.


Cheers & hth.,

- Alf
I thought that's what I did. Is there some other way?
 
W

W. eWatson

* W. eWatson:

Well, Windows NT has always had *hardlinks*. <g>

I found it a bit baffling that that functionality is documented as not
implemented for Windows in the Python standard library.

But OK, it was non-trivial to do prior to Windows 2000; you had to sort
of hack it using the backup APIs since the functionality was not exposed
through the ordinary file APIs.




Copy and paste.


Cheers & hth.,

- Alf
Alf? Hello,Norway. My wife is Norwegian and that was her father's name.

I thought that's what I did. Is there some other way?

Tusin Tak (That's about the size of my vocabulary and spelling ability!
1000 thanks. What is the correct spelling?)
 
W

W. eWatson

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?
 
A

Alf P. Steinbach

* W. eWatson:
Alf? Hello,Norway. My wife is Norwegian and that was her father's name.

I thought that's what I did. Is there some other way?

(A)
For using Explorer, see

<url: http://windows.microsoft.com/en-us/windows7/Copy-and-paste-a-file>

and in particular look at the tips at the bottom.

(B)
To get absolute control you can use the command interpreter. I don't have
Windows7 but googling yielded the following URL:

<url: http://www.sevenforums.com/tutorials/947-command-prompt.html>

The "copy" command there copies files.

Tusin Tak (That's about the size of my vocabulary and spelling ability!
1000 thanks. What is the correct spelling?)

That's "tusen takk".


Cheers & hth.,

- Alf
 
J

Jerry Hill

So what's the bottom line? This link notion is completely at odds with XP,
and produces what I would call something of a mess to the unwary Python/W7
user. Is there a simple solution?

I know people went off on a tangent talking about symbolic links and
hard links, but it is extremely unlikely that you created something
like that by accident. Windows just doesn't create those without you
doing quite a bit of extra work. It certainly doesn't create them
when you drag & drop files around through the normal interface.
How do I get out of this pickle? I just want to duplicate the  program in
another folder, and not link to an ancestor.

You need to dig into the technical details of what's happening on your
hard drive. You say you "copied a program from folder A to folder B".
Can you describe, exactly, what steps you took? What was the file
name of the program? Was it just one file, or a directory, or several
files? What was the path to directory A? What is the the path to
directory B? When you open a CMD window and do a dir of each
directory, what exactly do you see?

You've given a pretty non-technical description of the problem you're
experiencing. If you want more than wild speculation, you'll need to
give more specifics for people to help you with.

My wild guess: you held down control and shift while copying your
program. That's the keyboard command to create a shortcut instead of
moving or copying a file.
 
C

chris grebeldinger

Have you tried opening file explorer in administrative mode before
performing the copy? I think if there isn't sufficient permissions,
it does something weird like that.
 
G

Gib Bogle

chris said:
Have you tried opening file explorer in administrative mode before
performing the copy? I think if there isn't sufficient permissions,
it does something weird like that.

No
 
M

Michel Claveau - MVP

Hi!
Symbolic links are available in NTFS starting with Windows Vista.

No.
Hardlink come with NTFS, and already exists in W2K (and NT with specifics utilities).

@-salutations
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top