/stdhome

To get this branch, use:
bzr branch http://bzr.ed.am/stdhome

« back to all changes in this revision

Viewing changes to src/stdhome.in

  • Committer: Tim Marston
  • Date: 2014-04-05 19:21:27 UTC
  • Revision ID: tim@ed.am-20140405192127-yvt08c7qnnp2nr8i
fixed some bugs in Bzr.revert()

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/python3
 
1
#!/usr/bin/python
2
2
#
3
3
# stdhome
4
4
#
21
21
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
22
22
 
23
23
 
24
 
# @PACKAGE_NAME@ version @PACKAGE_VERSION@@bzr_info@
 
24
# @PACKAGE_NAME@ version @PACKAGE_VERSION@
 
25
 
25
26
 
26
27
if __name__ == "__main__":
27
28
 
28
29
        import sys
29
30
        from os.path import join, abspath, exists
30
31
 
31
 
        # add regular site-package directories (for debian)
32
 
        for path in sys.path:
33
 
                if path.endswith('dist-packages'):
34
 
                        sys.path.append( path[:-13] + 'site-packages' )
35
 
 
36
32
        # check for a development source directory and use that if it's there
37
33
        PACKAGE_DIR = join( abspath( sys.path[ 0 ] ), "..", "lib" )
38
34
        if exists( join( PACKAGE_DIR, "stdhome", "the.py" ) ):
39
 
                print("!!! using development packages !!!", file=sys.stderr)
 
35
                print >> sys.stderr, "!!! using development packages !!!"
40
36
                sys.path.insert( 0, PACKAGE_DIR )
41
37
        else:
42
38
                del PACKAGE_DIR
43
 
        
 
39
 
44
40
        # start main program
45
41
        from stdhome import the
46
42
        from stdhome.program import Program
47
 
        the.program = Program( "@PACKAGE_VERSION@@bzr_info@" )
 
43
        the.program = Program( "@PACKAGE_VERSION@" )
48
44
        the.program.run()