test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Directories.py
Go to the documentation of this file.
1 import sys
2 import os
3 import logging
4 
5 import Vispa.__init__
6 
7 def setBaseDirectory(dir):
8  global baseDirectory, mainDirectory, pluginDirectory, docDirectory
9  baseDirectory = dir
10  logging.debug(__name__ +': baseDirectory - '+baseDirectory)
11  mainDirectory = os.path.join(baseDirectory, "Vispa/Main")
12  logging.debug(__name__ +': mainDirectory - '+mainDirectory)
13  pluginDirectory = os.path.join(baseDirectory, "Vispa/Plugins")
14  logging.debug(__name__ +': pluginDirectory - '+pluginDirectory)
15  docDirectory = os.path.join(baseDirectory, "doc/pxldoc")
16  logging.debug(__name__ +': docDirectory - '+docDirectory)
17 
19  global homeDirectory, preferencesDirectory, iniFileName, logDirectory
20  homeDirectory = dir
21  logging.debug(__name__ +': homeDirectory - '+homeDirectory)
22  preferencesDirectory = os.path.abspath(os.path.join(homeDirectory,".vispa"))
23  logging.debug(__name__ +': preferencesDirectory - '+preferencesDirectory)
24  iniFileName = os.path.abspath(os.path.join(preferencesDirectory,"vispa.ini"))
25  logging.debug(__name__ +': iniFileName - '+iniFileName)
26  logDirectory = os.path.abspath(preferencesDirectory)
27  logging.debug(__name__ +': logDirectory - '+logDirectory)
28 
29 def setWebsiteUrl(url):
30  global websiteUrl
31  websiteUrl=url
32 
33 setBaseDirectory(os.path.abspath(os.path.dirname(Vispa.__path__[0])))
34 setHomeDirectory(os.path.expanduser("~"))
35 setWebsiteUrl("http://vispa.sourceforge.net")
36 
37 applicationName=os.path.splitext(os.path.basename(sys.argv[0]))[0]