/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/resource.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/resource.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1131 by jonathan, Fri May 9 16:31:39 2003 UTC revision 1132 by frank, Thu Jun 5 13:27:17 2003 UTC
# Line 6  Line 6 
6  # Read the file COPYING coming with Thuban for details.  # Read the file COPYING coming with Thuban for details.
7    
8  import os  import os
9    import os.path
10    from tempfile import mktemp
11    
12  import Thuban  import Thuban
13  from Thuban import _  from Thuban import _
14    
# Line 17  from xml.sax import SAXParseException Line 20  from xml.sax import SAXParseException
20  projdir = \  projdir = \
21          os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections")          os.path.join(Thuban.__path__[0], os.pardir, "Resources", "Projections")
22    
23  usrdir  = os.path.expanduser("~/.thuban")  if os.name == 'nt':
24        # This should result in something like the user directory ...
25        guess = os.path.dirname(os.path.dirname(os.path.dirname(mktemp())))
26        usrdir = os.path.join(guess, ".thuban")
27        if not os.path.isdir(usrdir):
28            os.mkdir(usrdir)
29    else:
30        usrdir  = os.path.expanduser("~/.thuban")
31    
32  PROJ_EXT = ".proj"  PROJ_EXT = ".proj"
33    

Legend:
Removed from v.1131  
changed lines
  Added in v.1132

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26