File tree Expand file tree Collapse file tree 1 file changed +18
-9
lines changed
Expand file tree Collapse file tree 1 file changed +18
-9
lines changed Original file line number Diff line number Diff line change 2727
2828
2929def get_drives ():
30- """Return all active drives """
31- import win32api
30+ """
31+ This function retrieves a list of existing drives on a Windows system.
3232
33- return win32api .GetLogicalDriveStrings ().split ("\000 " )[:- 1 ]
33+ Returns:
34+ list: A list of drive letters (e.g., ['C:', 'D:'])
35+ """
36+ if hasattr (os , 'listdrives' ): # For Python 3.12 and above
37+ return os .listdrives ()
38+ else :
39+ drives = [f"{ d } :\\ " for d in os .environ .get ('HOMEDRIVE' , '' ).split ("\\ " ) if d ]
40+ return drives
3441
3542
3643def get_nsis_exe ():
@@ -791,12 +798,14 @@ def _create_launchers(self):
791798 #)
792799
793800 # Jupyter launchers
794- self .create_launcher (
795- "IPython Qt Console.exe" ,
796- "ipython.ico" ,
797- command = "wscript.exe" ,
798- args = r"Noshell.vbs winqtconsole.bat" ,
799- )
801+
802+ # removing another Qt string
803+ # self.create_launcher(
804+ # "IPython Qt Console.exe",
805+ # "ipython.ico",
806+ # command="wscript.exe",
807+ # args=r"Noshell.vbs winqtconsole.bat",
808+ # )
800809
801810 # this one needs a shell to kill fantom processes
802811 self .create_launcher (
You can’t perform that action at this time.
0 commit comments