Newbie questions: symbolic links and hashable items

P

pekka.niiranen

Hi everybody,

1) I am accessing HP-UX partition thru Samba mount.
My problem is: Using shutil.copy() copies symbolic links
because os.path.islink() does not recognize those as links.
How can I make Python running in W2K recognize
symbolic links from Samba -mount?

2) How can I check whether a value is hashable?
The code below works but for going thru set of values
it seems bit odd.

# x is hashable ?
u = {}
try:
u[x] = ''
except TypeError:


3) Can filenames in any operating system, all Unicode objects and all
strings be assumed as hashable? I would like to use them as dictionary keys.

-pekka-
 

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,013
Latest member
KatriceSwa

Latest Threads

Top