Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

cmenu: proper method for finding python.exe

Had to be reminded yet again that sys.executable is 'explorer.exe'
when in the context of the shell extensions. Source installs now
work as well as the binary installer.

Changeset 47efd70759a2

Parent c48c554f3e42

by Steve Borho

Changes to one file · Browse files at 47efd70759a2 Showing diff from parent c48c554f3e42 Diff from another changeset...

 
230
231
232
233
234
 
 
 
235
236
237
 
230
231
232
 
 
233
234
235
236
237
238
@@ -230,8 +230,9 @@
  cmdline = ['hgtk.exe', hgcmd]   elif not hasattr(sys, 'frozen'):   pypath = os.path.join(get_prog_root(), 'hgtk') - if os.path.exists(pypath): - cmdline = [sys.executable, pypath, hgcmd] + pyexe = os.path.join(sys.exec_prefix, 'python.exe') + if os.path.exists(pypath) and os.path.exists(pyexe): + cmdline = [pyexe, pypath, hgcmd]   if not cmdline:   win32ui.MessageBox('Unable to find ' + pypath, 'run_dialog')   return