@@ -464,7 +464,11 @@ def setup_window(self):
464464 unregister_action = create_action (self , "Unregister distribution..." ,
465465 tip = "Unregister file extensions, icons and context menu" ,
466466 triggered = self .unregister_distribution )
467- add_actions (option_menu , (register_action , unregister_action ))
467+ open_console_action = create_action (self , "Open console here" ,
468+ triggered = lambda : os .startfile (self .command_prompt_path ))
469+ open_console_action .setEnabled (osp .exists (self .command_prompt_path ))
470+ add_actions (option_menu , (register_action , unregister_action ,
471+ None , open_console_action ))
468472
469473 # View menu
470474# view_menu = self.menuBar().addMenu("&View")
@@ -570,6 +574,11 @@ def unregister_distribution(self):
570574 if answer == QMessageBox .Yes :
571575 associate .unregister (self .distribution .target )
572576
577+ @property
578+ def command_prompt_path (self ):
579+ return osp .join (self .distribution .target , osp .pardir ,
580+ "WinPython Command Prompt.exe" )
581+
573582 def distribution_changed (self , path ):
574583 """Distribution path has just changed"""
575584 for package in self .table .model .packages :
0 commit comments