Re: Creating shortcuts?
Ron Griswold wrote: > Hi Dennis, > > Yes, I am equating a unix soft link to a windows shortcut. Both act as > links to a file or directory. > > I have found that windows shortcuts do appear in linux dir listings with > a .lnk extension, however the file is meaningless to linux. On the other > hand, a linux soft link does not appear in a windows directory listing, > not that I really want it to. > > As for os.link and os.symlink, these appear to be unix specific. It > would be nice if os.symlink, when run on windows, would create a > shortcut. > > Thanks, > > Ron Griswold > Character TD > R!OT Pictures > [EMAIL PROTECTED] > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Dennis Lee Bieber > Sent: Friday, January 13, 2006 12:26 AM > To: python-list@python.org > Subject: Re: Creating shortcuts? > > On Thu, 12 Jan 2006 22:53:42 -0800, "Ron Griswold" > <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >>Is it possible to create a shortcut to a file in Python? I need to do >>this in both win32 and OSX. I've already got it covered in Linux by >>system(ln...). >> > > > Are you equating a Windows "shortcut" to a Unix "link"? Soft > link, > at that, I suspect -- as a hard link can be done using os.link(), though > a soft link can be done with os.symlink(). Lets see if my terminology is > correct: a "hard link" is an additional directory entry pointing to a > pre-existing file (with a count of how many entries exist for the file); > a "soft link" is basically a special file that contains the full path to > the actual file (and hence, could cross file system boundaries). > > I don't think Windows "shortcuts" are the same thing (as my > memory > struggles, I have vague inklings that NTFS actually supports Unix-like > links, but practically nothing uses them). At best, they may be similar > to a soft link, being a particular type of file, being that they are > files with a ".lnk" extension (and hidden by the OS normally) UNIX links and Windows .lnk files are not the same thing. Links on UNIX, both soft and hard, are known by the filesystem. .lnk files on Windows are recognized by the OS as indicating that a different file is to be used. -- http://mail.python.org/mailman/listinfo/python-list
RE: Creating shortcuts?
Hi Roger, Thank you, I will look into this. Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Roger Upole Sent: Friday, January 13, 2006 4:59 AM To: python-list@python.org Subject: Re: Creating shortcuts? On Windows, Pywin32 allows you to create and manipulate shortcuts. See \win32comext\shell\test\link.py for a small class that wraps the required interfaces. hth Roger "Ron Griswold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi Folks, Is it possible to create a shortcut to a file in Python? I need to do this in both win32 and OSX. I've already got it covered in Linux by system(ln...). Thanks, Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption = -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
RE: Creating shortcuts?
Hi Dennis, Yes, I am equating a unix soft link to a windows shortcut. Both act as links to a file or directory. I have found that windows shortcuts do appear in linux dir listings with a .lnk extension, however the file is meaningless to linux. On the other hand, a linux soft link does not appear in a windows directory listing, not that I really want it to. As for os.link and os.symlink, these appear to be unix specific. It would be nice if os.symlink, when run on windows, would create a shortcut. Thanks, Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis Lee Bieber Sent: Friday, January 13, 2006 12:26 AM To: python-list@python.org Subject: Re: Creating shortcuts? On Thu, 12 Jan 2006 22:53:42 -0800, "Ron Griswold" <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > Is it possible to create a shortcut to a file in Python? I need to do > this in both win32 and OSX. I've already got it covered in Linux by > system(ln...). > Are you equating a Windows "shortcut" to a Unix "link"? Soft link, at that, I suspect -- as a hard link can be done using os.link(), though a soft link can be done with os.symlink(). Lets see if my terminology is correct: a "hard link" is an additional directory entry pointing to a pre-existing file (with a count of how many entries exist for the file); a "soft link" is basically a special file that contains the full path to the actual file (and hence, could cross file system boundaries). I don't think Windows "shortcuts" are the same thing (as my memory struggles, I have vague inklings that NTFS actually supports Unix-like links, but practically nothing uses them). At best, they may be similar to a soft link, being a particular type of file, being that they are files with a ".lnk" extension (and hidden by the OS normally) -- > == < > [EMAIL PROTECTED] | Wulfraed Dennis Lee Bieber KD6MOG < > [EMAIL PROTECTED] | Bestiaria Support Staff < > == < > Home Page: <http://www.dm.net/~wulfraed/>< >Overflow Page: <http://wlfraed.home.netcom.com/>< -- http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list
Re: Creating shortcuts?
On Windows, Pywin32 allows you to create and manipulate shortcuts. See \win32comext\shell\test\link.py for a small class that wraps the required interfaces. hth Roger "Ron Griswold" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi Folks, Is it possible to create a shortcut to a file in Python? I need to do this in both win32 and OSX. I've already got it covered in Linux by system(ln...). Thanks, Ron Griswold Character TD R!OT Pictures [EMAIL PROTECTED] == Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News== http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups = East and West-Coast Server Farms - Total Privacy via Encryption = -- http://mail.python.org/mailman/listinfo/python-list