Win32 Drive List Redux
R.Marquez
ny_r_marquez at yahoo.com
Fri Jan 3 11:18:57 EST 2003
More information about the Python-list mailing list
Fri Jan 3 11:18:57 EST 2003
- Previous message (by thread): Win32 Drive List Redux
- Next message (by thread): Win32 Drive List Redux
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Why not use Py2Exe to convert your app into a stand alone exe. It creates a subfolder containing a PythonXX.dll and all the other files needed for your app to run. Then you could create a nice litle self installer with something like Inno Setup (http://www.jrsoftware.org/isinfo.htm), and distribute it to your heart's content. :) -Ruben Tim Daneliuk <tundra at tundraware.com> wrote in message news:<ert1va.ruj2.ln at boundary.tundraware.com>... > Some time ago, there was a brief thread on how to get a list of > available drives on Win32. Peter Hansen suggested the use of: > > win32api.GetLogicalDriveStrings() > > > And Ken Seehof suggested: > > def drives(): > d = [] > for c in string.lowercase: > if os.path.exists('%s:/'%c): > d.append('%s:'%c) > return d > > > In my application, the first solution is not practical because I cannot > gurantee the user will have win32api (win32all) installed. > > The second solution is perfect, except ... on some machines (and I > don't know why not on others), the attempt to check for 'a:/' causes > Windows to present a dialog demanding that you insert a floppy to > continue. The bchavior is identical if you use 'a:\\' as the test > string. This is a showstopper for my intented use. Does anyone have > a workaround or a better way to get the drive list? > ------------------------------------------------------------------------------ > Tim Daneliuk > tundra at tundraware.com
- Previous message (by thread): Win32 Drive List Redux
- Next message (by thread): Win32 Drive List Redux
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list