How to get volume name under Win32?
dale at out-think.NOSPAMco.uk
Fri May 19 02:24:42 CEST 2000
Thanks for the info but I can't get your example to work:
>>> import os
>>> info = os.popen(r'dir c:\missing.ext').readlines()
Traceback (innermost last):
File "<interactive input>", line 1, in ?
OSError: (0, 'Error')
Have I missed something?
Out-Think Ltd, UK
Emile van Sebille <emile at fenx.com> wrote in message
news:074701bfc122$d57310c0$1906a8c0 at fc.fenx.com...
> It seems this came up recently with a legitimate way of getting
> directly to the label using win32 extensions, so you may want
> to look for that, but in the meantime, this gets you there with
> a little parsing:
> import os
> info = os.popen(r'dir x:\missing.ext').readlines()
> or at least here on win95 info holds the volume name.
> Emile van Sebille
> emile at fenx.com
> Dale Strickland-Clark <dale at out-think.NOSPAMco.uk> wrote in message
> news:<8g1tn6$cf2$1 at supernews.com>...
> > I can't find a function that'll tell me the volume name for a given
> > letter - on NT / Win2000
> > Can anyone help?
> > Thanks
> > --
> > Dale Strickland-Clark
> > Out-Think Ltd, UK
> > --
> > http://www.python.org/mailman/listinfo/python-list
More information about the Python-list