Linux servers, network and file names

Infinity77 andrea.gavana at gmail.com
Thu Apr 22 10:13:47 EDT 2010


Hi All,

I apologize in advance if this sounds like a stupid question but I am
really no expert at all in network things, and I may be looking in the
wrong direction altogether.

At work we have a bunch of Linux servers, and we can connect to them
with our Windows PCs over a network. Now, let's assume we only have
one Linux server, let's call it SERVER. Everyone of us, on our Windows
PC, can map this server as a network drive choosing whatever Windows
"drive letter" he wants. For example, I could map SERVER to be "Y:/",
my colleague might call it "Z:/" and so on.

The problem arises in one of my little applications, which allows the
user to choose a file living in SERVER and do some calculations with
it; then, this file name gets saved in a common database (common in
the sense that it is shared between Windows users, ourselves). Now, I
choose this file myself, the FileDialog (a window representing a file
selector dialog) will return something like this (let's ignore the
back/forward slashes, this is not an issue):

Y:/Folder/FileName.txt

If my colleague does it, he will get:

Z:/Folder/FileName.txt

Even if I am able to work out the server name using the Windows drive
letter (and I was able to do it, now I don't remember anymore how to
do it), what I get is:

For me:  //SERVER/gavana/Folder/FileName.txt
Colleague: //SERVER/Colleague/Folder/FileName.txt

So, no matter what I do, the file name stored in the database is user-
dependent and not universal and common to all of us.

Am I missing something fundamental? I appreciate any suggestion, even
a Windows-only solution (i.e., based on PyWin32) would be perfect.

Thank you in advance for your help.

Andrea.



More information about the Python-list mailing list