Package Ganga :: Package Runtime :: Module associations
[hide private]
[frames] | no frames]

Source Code for Module Ganga.Runtime.associations

 1  ################################################################################# Ganga Project. http://cern.ch/ganga 
 2  # 
 3  # $Id: associations.py,v 1.2 2009-03-10 12:19:20 moscicki Exp $ 
 4  ################################################################################# 
 5  # File: associations.py 
 6  # Author: K. Harrison 
 7  # Created: 061123 
 8  # 
 9  """ 
10  Module defining default associations 
11  between file types and file-viewing commands. 
12  Values are stored in a configuration object, 
13  and modifications/additions can be made 
14  in the [File_Associations] section of a 
15  configuration file. 
16  """ 
17                                                                                   
18  __author__  = "K.Harrison <Harrison@hep.phy.cam.ac.uk>" 
19  __date__    = "23 November 2006" 
20  __version__ = "1.0" 
21   
22  from Ganga.Utility.Config import makeConfig 
23  config = makeConfig( "File_Associations",'Default associations between file types and file-viewing commands. The name identifies the extension and the value the commans. New extensions can be added. A single & after the command indicates that the process will be started in the background. A && after the command indicates that a new terminal will be opened and the command executed in that terminal.' , is_open=True) 
24   
25  config.addOption("newterm_command","xterm",'Command for opening a new terminal (xterm, gnome-terminal, ...') 
26  config.addOption("newterm_exeopt","-e",'Option to give to a new terminal to tell it to execute a command.') 
27  config.addOption("listing_command","ls -ltr",'Command for listing the content of a directory') 
28  config.addOption('fallback_command','less','Default command to use if there is no association with the file type') 
29  config.addOption('htm','firefox &','Command for viewing html files.') 
30  config.addOption('html','firefox &','Command for viewing html files.') 
31  config.addOption('root','root.exe &&','Command for opening ROOT files.') 
32  config.addOption('tar','file-roller &','Command for opening tar files.') 
33  config.addOption('tgz','file-roller &','Command for opening tar files.') 
34